dillon1000/react

Commit

🔥 Stop syncing the value attribute on inputs (behind a feature flag) (#13526)

* :fire: Stop syncing the value attribute on inputs

* Eliminate some additional checks

* Remove initialValue and initialWrapper from wrapperState flow type

* Update tests with new sync logic, reduce some operations

* Update tests, add some caveats for SSR mismatches

* Revert newline change

* Remove unused type

* Call toString to safely type string values

* Add disableInputAttributeSyncing feature flag

Reverts tests to original state, adds attribute sync feature flag,
then moves all affected tests to ReactFire-test.js.

* Revert position of types in toStringValues

* Invert flag on number input blur

* Add clarification why double blur is necessary

* Update ReactFire number cases to be more explicite about blur

* Move comments to reduce diff size

* Add comments to clarify behavior in each branch

* There is no need to assign a different checked behavior in Fire

* Use checked reference

* Format

* Avoid precomputing stringable values

* Revert getToStringValue comment

* Revert placement of undefined in getToStringValue

* Do not eagerly stringify value

* Unify Fire test cases with normal ones

* Revert toString change. Only assign unsynced values when not nully
Browse files
Changed paths16 files
First-parent comparison
M packages/react-dom/src/__tests__/DOMPropertyOperations-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMInput-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMServerIntegrationCheckbox-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMServerIntegrationInput-test.js ModifiedM packages/react-dom/src/client/ReactDOMInput.js ModifiedM packages/react-dom/src/events/ChangeEventPlugin.js ModifiedM packages/react-dom/src/events/__tests__/ChangeEventPlugin-test.internal.js ModifiedM packages/shared/ReactFeatureFlags.js ModifiedM packages/shared/forks/ReactFeatureFlags.native-fabric-fb.js ModifiedM packages/shared/forks/ReactFeatureFlags.native-fabric-oss.js ModifiedM packages/shared/forks/ReactFeatureFlags.native-fb.js ModifiedM packages/shared/forks/ReactFeatureFlags.native-oss.js ModifiedM packages/shared/forks/ReactFeatureFlags.persistent.js ModifiedM packages/shared/forks/ReactFeatureFlags.test-renderer.js ModifiedM packages/shared/forks/ReactFeatureFlags.www.js ModifiedM scripts/jest/setupFire.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…