@bolideai/mf-shared-state
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

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

  1. Install dependencies:
npm install
  1. Make changes
  2. Build:
npx webpack

Author

Dubov V. vitaliy.dubov@searchanise.io

Readme

Keywords

none

Package Sidebar

Install

npm i @bolideai/mf-shared-state

Weekly Downloads

52

Version

1.0.6

License

ISC

Unpacked Size

2.94 kB

Total Files

5

Last publish

Collaborators

  • bolideai