You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like React is updating the defaultValue of <textarea> elements and the checked property of elements even when their values haven’t changed. This leads to unnecessary DOM mutations, which can impact performance, especially when there are many components that re-render frequently.
Steps to Reproduce
Render a controlled <textarea> or with defaultValue or checked set.
Trigger a re-render by updating some other unrelated props.
Notice that React still updates the defaultValue or checked properties, even though the values haven't changed.
Expected Behavior
React should only update the defaultValue or checked properties when the values actually change, avoiding unnecessary DOM updates.
Actual Behavior
The properties are being updated unnecessarily, even if the values remain unchanged, leading to redundant DOM mutations.
Suggested Solution
React should add a check to only update the defaultValue and checked properties if their values have changed. This would reduce unnecessary updates and improve overall performance.
Environment
React version: [Insert React version]
Browser: [Insert browser and version]
Operating System: [Insert OS name and version]
Key Words / Search Terms
defaultValue, checked, textarea, input, performance, DOM mutations, unnecessary updates
Description
It looks like React is updating the defaultValue of <textarea> elements and the checked property of elements even when their values haven’t changed. This leads to unnecessary DOM mutations, which can impact performance, especially when there are many components that re-render frequently.
Steps to Reproduce
Render a controlled <textarea> or with defaultValue or checked set.
Trigger a re-render by updating some other unrelated props.
Notice that React still updates the defaultValue or checked properties, even though the values haven't changed.
Expected Behavior
React should only update the defaultValue or checked properties when the values actually change, avoiding unnecessary DOM updates.
Actual Behavior
The properties are being updated unnecessarily, even if the values remain unchanged, leading to redundant DOM mutations.
Suggested Solution
React should add a check to only update the defaultValue and checked properties if their values have changed. This would reduce unnecessary updates and improve overall performance.
Environment
React version: [Insert React version]
Browser: [Insert browser and version]
Operating System: [Insert OS name and version]
Key Words / Search Terms
defaultValue, checked, textarea, input, performance, DOM mutations, unnecessary updates
Repository Version
v19.0.0
The text was updated successfully, but these errors were encountered: