Skip to main content

Provider

Provider is a component that makes the store available throughout your App for use using React's Context API. The following example shows how the store is passed to Provider which makes it accessible from anywhere inside <App />.

import { Provider } from "@syncstate/react";
const rootElement = document.getElementById("root");
ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
rootElement
);
Last updated on by RohitGeekyAnts