Context
Context-related functions for providing and injecting stores into the app or part of the app.
For all the examples assume the following store.ts
file:
provideStore
Provide a store to all child components, enabling them to access the store without having to pass it down as a prop.
Parameters
store
(Store
): The store to provide.
Example
injectStore
Inject a store provided by provideStore
.
Example