
Research
/Security News
Compromised npm Packages in the AsyncAPI Namespace Deliver Miasma Botnet Loader
4 compromised asyncapi packages deliver miasma botnet loader on macOS, Linux and Windows.
@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 16 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.

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

Research
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.