-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
I might be using it wrongly, so excuse me in this case ...
Using get to retrieve store values doesn't trigger a component re-render
Steps
- Create a component which listen to values
- Update store values in a different component/provider, etc
- Check whether the components which listen/consumes to the store value
- See error --> Notice it doesn't get updated
If I use get ... no re-renders
export const ParametersControl = memo(() => {
const { set, get } = dataStore;
const collection = get.collection?.();
const collections = get.collections();
const colorMap = get.colorMap();
const time = get.time?.();
If I use use ... it re-renders
export const ParametersControl = memo(() => {
const { set, use } = dataStore;
const collection = use.collection?.();
const collections = use.collections();
const colorMap = use.colorMap();
const time = use.time?.();
Expectation
Should get and use work the same way? What am I missing?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working

