diff --git a/packages/react-dom-bindings/src/client/ReactDOMInput.js b/packages/react-dom-bindings/src/client/ReactDOMInput.js index 4411887e3cbf0..744a6e931d9c3 100644 --- a/packages/react-dom-bindings/src/client/ReactDOMInput.js +++ b/packages/react-dom-bindings/src/client/ReactDOMInput.js @@ -175,8 +175,13 @@ export function updateInput( } } - if (checked != null && node.checked !== !!checked) { - node.checked = checked; + if (checked != null) { + // Important to set this even if it's not a change in order to update input + // value tracking with radio buttons + // TODO: Should really update input value tracking for the whole radio + // button group in an effect or something (similar to #27024) + node.checked = + checked && typeof checked !== 'function' && typeof checked !== 'symbol'; } if ( diff --git a/packages/react-dom/src/__tests__/ReactDOMComponent-test.js b/packages/react-dom/src/__tests__/ReactDOMComponent-test.js index 9ba1ed9dcff93..2e903aba8abf8 100644 --- a/packages/react-dom/src/__tests__/ReactDOMComponent-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMComponent-test.js @@ -1094,18 +1094,12 @@ describe('ReactDOMComponent', () => { it('should not incur unnecessary DOM mutations for boolean properties', () => { const container = document.createElement('div'); - function onChange() { - // noop - } - ReactDOM.render( - , - container, - ); + ReactDOM.render(