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

What are your thoughts on using stateless function components + redux as the way to maintain UI state? #55

Closed
jimbolla opened this issue Sep 22, 2015 · 1 comment

Comments

@jimbolla
Copy link

Would you do it? And if so, how would you shape your state to separate UI state from model state?

@gaearon
Copy link
Owner

gaearon commented Oct 4, 2015

Tough question. I wouldn't go so far as to put all state into Redux store—just what feels natural and simplifies the surrounding code, predictability and testing.

To be honest I have no idea about the future of managing state. I don't think setState() is the right API but I'm not sure about alternatives either. I think we might have gone too far into the “externalize the state” direction thus losing the colocation. Maybe React can provide a better state API that would yield the same benefits as Redux gives you, but with colocation.

I'm really interested in “fractal architectures” like Elm Architecture and Cycle's Nested Dialogues as Andre Staltz describes here. I wrote React Elmish Example to try to better understand Elm architecture myself.

The future is fun and

12968-i-have-no-idea-what-im-doing1

@gaearon gaearon closed this as completed Oct 4, 2015
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