-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Delete Stack reconciler #10517
Delete Stack reconciler #10517
Conversation
(Edit: filed #10518 for this. Added FlowFixMe for existing issue for now.)(Edit 2: rebased on master where this is fixed)I almost fixed Flow after replacing // TODO (bvaughn) Rename the findNodeHandle module to something more descriptive
// eg findInternalHostInstance. This will reduce the likelihood of someone
// accidentally deep-requiring this version.
function findNodeHandle(componentOrHandle: any): any {
if (__DEV__) {
// TODO: fix this unsafe cast to work with Fiber.
var owner = ((ReactCurrentOwner.current: any): Fiber | null);
if (owner !== null) {
warning(
owner._warnedAboutRefsInRender,
'%s is accessing findNodeHandle inside its render(). ' +
'render() should be a pure function of props and state. It should ' +
'never access something that requires stale data from the previous ' +
'render, such as refs. Move this logic to componentDidMount and ' +
'componentDidUpdate instead.',
getComponentName(owner) || 'A component',
);
owner._warnedAboutRefsInRender = true;
}
} In my understanding if we actually go down that code path in Fiber, we'll throw because we can't define So is it a bug? Does the warning unintentionally throw? |
@@ -108,9 +108,40 @@ | |||
"version-check": "node ./scripts/tasks/version-check.js" | |||
}, | |||
"jest": { | |||
"projects": [ |
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 tried keeping just one project but even the newest version of Jest (21 alpha) crashes with just one project so I had to inline the config back. cc @cpojer in case this is not known.
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.
Yup, it's a known issue you already filed jestjs/jest#4117 😉
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.
Right, thanks. I remember a few issues were recently closed so I wasn't sure. Sorry I didn't check 😛
⚛️🎉 I'm stacking every fiber in my body in favor of this PR. |
4277bab
to
94fd74c
Compare
I think this is ready for review. |
Hi, I want to know how to find the complete src code(because maybe I want to learn Stack reconciler) after we delete Stack reconciler? |
You can always view old release tags on GitHub or check out old branches like 15-stable in git. |
Thanks, I forget that. So will we update Stack reconciler on old branches like 15-stable in the future? |
No, there are no plans to work on Stack. Fiber replaces it. |
d090a2d
to
b9a1ba7
Compare
b9a1ba7
to
4a2d836
Compare
Rebased. |
Follow up to #10511.