Provider for passing states between micro-frontends in Module Federation
npm i @bolideai/mf-shared-state
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);
- Install dependencies:
npm install
- Make changes
- Build:
npx webpack
Dubov V. vitaliy.dubov@searchanise.io