dustingetz / react-cursor

Immutable state for React.js
1.03k stars 50 forks source link

Avoid unnecessary renders #66

Closed danielmiladinov closed 8 years ago

danielmiladinov commented 9 years ago

This works for non-function values passed to update, updating with function values will need more thought.

Happy to receive feedback on what I have so far.

dustingetz commented 9 years ago

Why doesn't it work with functions? (We don't support functions, but this code looks like it would work)

danielmiladinov commented 9 years ago

Updated the PR, now it handles both function and non-function cases of nextUpdate. Could probably use some cleanup, but the basic idea is in place.

dustingetz commented 8 years ago

This looks merge-able to me, did we have a reason for not merging this yet?

dustingetz commented 8 years ago

I merged this PR into 2.0. The final result took more work due to the 2.0 changes (decoupling from react) impacting this issue in unexpected ways.