-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
interrupt the rendering of react #15
Comments
Hey, good question. I've been asked this before. Maybe I should add a FAQ section and include this question. You can't interrupt the React rendering. However, you can:
|
However, this needs to be done carefully, because React is able to batch state updates. If done blindly, yielding after each setState might produce more re-renders than needed (= worse performance ultimately). |
Ah, you are right. I've started writing an FAQ section with a more nuanced answer and information on the topic. Thanks! |
This project is great, I would like to ask whether it can interrupt the rendering of react. For example, if there is a list of 10,000 length arrays and react updates this array when performing state updates, can it interrupt the rendering
The text was updated successfully, but these errors were encountered: