2 ms·
It does a shallow compare, not a deep compare. Workarounds tend to involve additional hooks: https://dev.to/vsramalwan/ways-to-handle-deep-object-comparison-i
by Izkata 3y ago
It does a shallow compare, not a deep compare. Workarounds tend to involve additional hooks: https://dev.to/vsramalwan/ways-to-handle-deep-object-comparison-in-useeffect-hook-1elm https://dev.to/vsramalwan/ways-to-handle-deep-object-compari...
- vlod 3y agoI heard that immutability libraries like immer.js [0] help with this. Anyone go this way and had good success? Is this 'the way'? [0]: https://immerjs.github.io/immer/ https://immerjs.github.io/immer/