
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
@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
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
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.