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

Suspense #7

Open
BigAB opened this issue Oct 25, 2019 · 0 comments
Open

Suspense #7

BigAB opened this issue Oct 25, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@BigAB
Copy link
Owner

BigAB commented Oct 25, 2019

Is your feature request related to a problem? Please describe.
In order to take advantage of the React suspense component, along with concurrent mode, so that w don't have to include loading: true, and the like, in our state....

Describe the solution you'd like
As always intended but I was waiting until some big announcement about data fetching and suspense at React Conf that never really came, so....

Use Suspense in React by an option called suspense which will default to false at first but may change in the future (breaking change) to default to true

If suspense is set to true, whenever the newState$ observable, returned from the Epic returns undefined, it will throw a promise, that will resolve on the next non-undefined value emitted from new state.

Describe alternatives you've considered
Of course you are free to not opt in (or opt out in the future) to this behaviour and handle your own loading states and spinners, I think the React way is to use the suspense component.

@BigAB BigAB added the enhancement New feature or request label Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant