subscribeWithSelector
subscribeWithSelector middleware lets you subscribe to specific data based on current state.
Types
Signature
Mutator
Reference
subscribeWithSelector(stateCreatorFn)
Parameters
stateCreatorFn: A function that takessetfunction,getfunction andstoreas arguments. Usually, you will return an object with the methods you want to expose.
Returns
subscribeWithSelector returns a state creator function.
Usage
Subscribing partial state updates
By subscribing to partial state updates, you register a callback that fires whenever the store's
partial state updates. We can use subscribe for external state management.
Here's the html code
Troubleshooting
TBD