Skip to content

Read "current" props from the node instead of the Fiber - #8839

Merged
sebmarkbage merged 1 commit into
react:masterfrom
sebmarkbage:fixdominputtest
Jan 21, 2017
Merged

sebmarkbage merged 1 commit into
react:masterfrom
sebmarkbage:fixdominputtest

Conversation

@sebmarkbage

Copy link
Copy Markdown
Contributor

This fixes controlled components after I broke them in. #8607

It's not just events that read the current props. Controlled components do as well. Since we're no longer updating the Fiber pointer during updates we have to instead read from the node props to get the current props.

Since this method is no longer just used for events I renamed it.

);
const props = EventPluginUtils.getFiberCurrentPropsFromNode(
internalInstance.stateNode
);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the only change. The rest is renames.

It's not just events that read the current props. Controlled components
do as well. Since we're no longer updating the Fiber pointer during updates
we have to instead read from the node props to get the current props.

Since this method is no longer just used for events I renamed it.
@sebmarkbage
sebmarkbage merged commit 4f8c16a into react:master Jan 21, 2017
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
It's not just events that read the current props. Controlled components
do as well. Since we're no longer updating the Fiber pointer during updates
we have to instead read from the node props to get the current props.

Since this method is no longer just used for events I renamed it.
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
It's not just events that read the current props. Controlled components
do as well. Since we're no longer updating the Fiber pointer during updates
we have to instead read from the node props to get the current props.

Since this method is no longer just used for events I renamed it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants