#Shallow Comparison not working (?)

1 messages · Page 1 of 1 (latest)

viral fern
#

I'm using Xstate with react and store some settings in my XState context.
For some reason it often happens that the state is updated, but my use selector with the shallow equal isnt detecting it.

    const settings = EditorMachineContext.useSelector((state) => state.context.settings, shallowEqual)

supple pine
#

Does it work without shallowEqual?

viral fern
supple pine
#

Can you share a full repro?

viral fern