Connector should use deepEqual
See original GitHub issueI have been hunting a bug that turns out to have been caused by the fact that Connector shallowly compares the current slice to the next. The diffs buried deep in a slice doesn’t trigger updates in the connected components because of this. For example:
Before:
{
MapReducer: {
layers: []
}
}
After:
{
MapReducer: {
layers: [{id: 1, name: 'my-layer'}]
}
}
…no updates.
I know I can do @connect(state => state.MapReducer)
but I also want the component to receive the state from other reducers. Any tips for me?
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
nodejs deep equal with differences - unit testing - Stack Overflow
I've tried should, when I compare two different object it just tells me "Error: AssertionError: expected {....} to equal {....}" without showing me...
Read more >Going Deep with XS: deepEqual and structuredClone
Node.js provides deepEqual assertions to perform deep comparison of ... Using deepEqual and structuredClone in your projects is easy.
Read more >fast-deep-equal - NPM Package Overview - Socket.dev
Start using Socket to analyze fast-deep-equal and its 0 dependencies to secure your app ... Tidelift will coordinate the fix and disclosure.
Read more >NuGet Gems: DeepEqual - Nicola Iarocci
An extensible deep comparison library for .NET. I am sure you too have come across this a few times. You have some code...
Read more >Gomega is a matcher
DeepEqual is awesome. It will use == when appropriate (e.g. when comparing primitives) but will recursively dig into maps, slices, arrays, and even...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For example
is wrong,
is correct.
No problem!