Using in Components
Here we use the Wire Root Store to connect functional and class components.
React Hook#
The root store has a useStore() hook for retrieving state, actions, and thunks.
In this example, we take the entire todos store and use destructuring to extract the state and actions. You could of course pull in state and actions from other stores as well.
Class Components#
Class components are connected similarly, but using a different function.