1.0.4 • Published 7 months ago
@bolideai/mf-shared-state v1.0.4
Bolideai Microservice Share State
Provider for passing states between micro-frontends in Module Federation
Installation
npm i @bolideai/mf-shared-state
Usage
In parent application:
import { ShareContextProvider } from '@bolideai/mf-shared-state';
<ShareContextProvider.Provider value={{ key: 12345, time: Date.now() }}>
...
</ShareContextProvider.Provider>
In any child application:
import { ShareContextProvider } from '@bolideai/mf-shared-state';
const { key, time } = React.useContext(ShareContextProvider);
Build and update
- Install dependencies:
npm install
- Make changes
- Build:
npx webpack
Author
Dubov V.S. vitaliy.dubov@bolide.ai
1.0.4
7 months ago