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

Fix autoFocus for hydration content when it is mismatched #11737

Merged
merged 11 commits into from
Dec 6, 2017
2 changes: 1 addition & 1 deletion packages/react-dom/src/client/ReactDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ const DOMRenderer = ReactFiberReconciler({
rootContainerInstance: Container,
): boolean {
setInitialProperties(domElement, type, props, rootContainerInstance);
return shouldAutoFocusHostComponent(type, props);
return true;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not good because now every host Fiber gets scheduled for an effect during commit. The whole point of returning a boolean is to avoid this, as ideally this should be a rare case.

},

prepareUpdate(
Expand Down