Can we achieve the same with reselect?
Sebastian Sebald
1

I’ve never used reselect so I don’t know for sure, but according to their docs reselect uses the identity check (===) to see if something has changed. If the reducer is always returning a new object, which most do, then reselect will never memoize. In order to overcome this they recommend doing a deep comparison of the old state vs. new state and only returning a new object if something has changed, but this can be expensive. ImmutableJS only changes the reference (identity) whenever an immutable value changes within the object so the identity check will automatically work out of the box.

I think this warrants some testing and benchmarking because I’m just going off what I know from reading, which I could be misunderstanding.

Here’s where I got my info about reselect.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.