
Security News
Next.js moves to scheduled security releases
Vercel is formalizing a monthly release program for Next.js. The change follows React2Shell and a sharp rise in AI-assisted vulnerability discovery.
@feige0629/react-common-store
Advanced tools
yarn add @feige0629/react-common-store
npm install @feige0629/react-common-store
import * as React from "react";
import { StoreRoot } from "@feige0629/react-common-store";
export default function App() {
return (
<StoreRoot>
...
</StoreRoot>
);
}
import { initState, compute } from "@feige0629/react-common-store";
export const $showGuides = initState<boolean>(true);
export const $selectedFlattenLayers = compute(({ get }) => {
const layerManager = get($layerManager)!;
const selectedLayers = get($selectedLayers)!;
return layerManager.toFlatten(selectedLayers);
});
import { useStoreRoot, useStoreStateSetPromise, useStoreStateValue, useStoreValue, useStoreState } from "@feige0629/react-common-store";
import { $showGuides, $selectedFlattenLayers } from "./stores";
// 第一种
const root = useStoreRoot();
const layers = root.get($layers);
root.set($layers, '新数据');
// 第二种
useStoreValue($showGuides, '新数据'); // 绑定全局数据
const showGuidesStore = useStoreValue($showGuides); // 获取数据
const value = showGuidesStore.value;
showGuidesStore.update(value); // 设置数据
// 第三种
const showGuidesStore = useStoreStateValue($showGuides); // 仅仅用来获取数据
// 第四种
const showGuidesStore = useStoreStateSetPromise($showGuides);
showGuidesStore('新数据').then(complete => { // 设置数据
if (!complete) {
return false;
}
....
return complete;
});
// 第五种
const [guidelines, setGuidelines] = useStoreState($showGuides);
guidelines // 获取数据
setGuidelines('新数据') // 设置数据
// 第六种
const setShowGuidesValue = useStoreStateSetValue($showGuides);
setShowGuidesValue('新数据') // 设置数据
FAQs
```tsx yarn add @feige0629/react-common-store
The npm package @feige0629/react-common-store receives a total of 12 weekly downloads. As such, @feige0629/react-common-store popularity was classified as not popular.
We found that @feige0629/react-common-store demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Vercel is formalizing a monthly release program for Next.js. The change follows React2Shell and a sharp rise in AI-assisted vulnerability discovery.

Research
/Security News
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.

Research
/Security News
4 compromised asyncapi packages deliver miasma botnet loader on macOS, Linux and Windows.