Closed vcardins closed 3 months ago
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
get
Steps
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
use
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?
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-renderSteps
If I use
get
... no re-rendersIf I use
use
... it re-rendersExpectation
Should get and use work the same way? What am I missing?