-
Notifications
You must be signed in to change notification settings - Fork 47.6k
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
Fixed invalid prop type warning to be more specific. #11300
Conversation
The person might still be trying to pass it as a string though. We should probably suggest both cases.
|
Would you like me to change the test cases as well? An example would be change ReactDOMComponent-test.js line 2058 from: |
Yes, we would need to fix the test cases. But the message you provided is wrong. When I said
If you read the message you posted, it appears completely broken. So I didn't mean that message. 😉 Please approach this from a user perspective: would a message with stack in the middle like |
* Flatten everything * Fix ReactDOMServerNode build * Fix native builds
While testing some changes to RN, I noticed that the '--sync-fbsource' flag had been broken recently by things being moved around and the newly-added CS renderer. Fixed it up.
* Split performWork into renderRoot and commitRoot It turns out that the scheduler is too coupled to how the DOM renderer works. Specifically, the requestIdleCallback model, and how roots are committed immediately after completing. Other renderers have different constraints for when to yield and when to commit work. We're moving towards a model where the scheduler only works on a single root at a time, and the render phase and commit phase are split into distinct entry points. This gives the renderer more control over when roots are committed, coordinating multiple roots, deferring the commit phase, batching updates, when to yield execution, and so on. In this initial commit, I've left the renderers alone and only changed the scheduler. Mostly, this involved extracting logic related to multiple roots and moving it into its own section at the bottom of the file. The idea is that this section can be lifted pretty much as-is into the renderers. I'll do that next. * Remove FiberRoot scheduleAt Isn't actually used anywhere * Make the root schedule a linked list again Since this still lives inside the renderer, let's just use the FiberRoot type. The FiberRoot concept will likely be lifted out eventually, anyway. * commitRoot should accept a HostRoot This way it's less reliant on the alternate model * Unify branches * Remove dead branch onUncaughtError is only called while we're working on a root. * remainingWork -> remainingExpirationTime I was wary of leaking NoWork but mixing numbers and null is worse so let's just do it until we think of something better. * Rename stuff
Closing this pr, will reopen another with the correct code in a few minutes. |
Before submitting a pull request, please make sure the following is done:
master
.yarn
in the repository root.yarn test
). Tip:yarn test --watch TestName
is helpful in development.yarn prettier
).yarn lint
). Tip:yarn linc
to only check changed files.yarn flow
).Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html