-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Discussion: Synchronous State Management and Async React #13286
Comments
Hey @markerikson! Don't want to disappoint you, but we've tried GitHub issues, chats, and video calls, and it still doesn't feel like the discussion is moving forward. I think this is mostly because all of these things sound too abstract, and to get a better idea one needs to play with these features — there's no substitute to that. We're working hard on getting these features closer to a state where they're usable enough that you can start experimenting with them. I think this is the most important thing we can do now — any discussions without practical demos, as we've already seen, tend to go in circles. So I'm asking that you please give us more time to prepare. When we're ready, we'll publish some examples with more detailed explanations of the behavior. So you'll be able to see what we mean exactly in each case. I think that once you try to implement the same behavior (e.g. with Redux) you'll see the issues we're trying to solve by yourself, and at that point the discussion will be significantly more productive. Until we're at that point, I'm afraid we don't have more to offer yet. Sorry to keep you waiting! |
Yeah, I think that's basically what I'm asking for :) Demos that show off difficult patterns, explanations of where the pain points are, etc, so that we've got something concrete to compare against. |
Here's something as a starting point: https://mobile.twitter.com/dan_abramov/status/1025185531515351040 We'll add more examples and explanations as it gets more solid. |
The React team has put out a fair amount of info on the upcoming async React concepts, including time sliced rendering and Suspense. They've also been in contact with the various state management library teams (Redux, MobX, and Apollo) to give us an early heads-up on how these libraries might need to change to work correctly with async React.
At this point I personally feel like I still have only a partial understanding of what types of changes are needed. Quoting a discussion between Dan and myself in reduxjs/react-redux#898 (comment) :
There was also some relevant discussion on Twitter at https://twitter.com/dan_abramov/status/1010978574105567234 :
The phrase "deopts to sync mode" was explained by Brian in #13186 (comment) :
Also, Andrew commented in https://twitter.com/acdlite/status/1015286450537951233 :
Finally, there's some related discussion in reduxjs/react-redux#890 .
So, at this point what I would particularly appreciate is further info on exactly what constraints a normally-synchronous state management lib like Redux or MobX needs to comply with in order to work correctly with async React behavior, and any suggestions on possible implementations. It would also be extremely beneficial if we could come up with some demo apps that specifically demonstrate problematic interactions between async React and synchronous state management logic, so that we can use those as points of reference for ensuring that new versions of our libraries work correctly going forward.
Paging @gaearon , @acdlite , @bvaughn , @timdorr , @jimbolla , @cellog , @mweststrate, @peggyrayzis , and @jbaxleyiii for their thoughts and participation.
The text was updated successfully, but these errors were encountered: