Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reductive doesn't avoid supurious rerenders #27

Open
conartist6 opened this issue Mar 13, 2018 · 2 comments
Open

Reductive doesn't avoid supurious rerenders #27

conartist6 opened this issue Mar 13, 2018 · 2 comments

Comments

@conartist6
Copy link

See: https://github.com/reasonml-community/reductive/blob/master/src/reductive.re#L64

The way createMake is written Reductive would never be able to perform the function of avoiding rerenders because there's only one action type and individual action types need to explicitly pattern match to whether or not an update should be done when in use by a reducer component.

React/Redux patterned applications shouldn't see responsiveness degrade continually as app size increases, and as far as I can tell currently they will, without explicit user intervention in the form of hand written shouldComponentUpdates.

@nlfiedler
Copy link
Contributor

I've tried to address this in pull request #35, and I covet your feedback. It's a proof of concept, not necessarily the best way to implement it. I tried to make the lens optional, but I couldn't manage to equate 'state to 'lensed if the argument was not provided. Likewise, I couldn't fashion an "identity" lens in a way that made the compiler happy. I only started learning ReasonML two weeks ago.

@nlfiedler
Copy link
Contributor

I think this is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants