-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat: Add option to render concurrent roots #507
Conversation
@@ -1 +1,2 @@ | |||
import '@testing-library/jest-dom/extend-expect' | |||
jest.mock('scheduler', () => require('scheduler/unstable_mock')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Biggest unknown to figure out. I think we need to use this to advance time (or something like that) if we have tests scheduling work (like setState).
I wonder why are tests failing to find |
"react": "^16.9.0", | ||
"react-dom": "^16.9.0", | ||
"react": "^0.0.0-experimental-f6b8d31a7", | ||
"react-dom": "^0.0.0-experimental-f6b8d31a7", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this resolves to the latest stable version. If we want to support the experimental release we have to do an exact version rather than ^
. I believe that's why tests are failing.
I'm not sure how close concurrent mode is (but I get the impression that it's not very close) so I think we should just close this for now and open it when concurrent mode is closer. Thanks! |
Yeah that was me playing around. Not sure how testing will look with a mocked scheduler. |
First draft. There's a lot to figure out (like error message if the experimental build isn't used or if this cleanup is correct etc)
What:
Adds
root
option torender
which currently only allowsconcurrent
but could be used to create blocking roots insteadWhy:
hype-driven-development
How:
Added a lot of branching logic but overall the implementation would be simpler with
create*Root
.Checklist:
docs site