Change:
it('should not incur unnecessary DOM mutations for boolean properties', () => { const container = document.createElement('div'); <del> function onChange() { // noop } ReactDOM.render( <input type="checkbox" onChange={onChange} checked={true} />, container, ); </del> <ins> ReactDOM.render(<audio muted={true} />, container); </ins> const node = container.firstChild; let nodeValue = true; const nodeValueSetter = jest.fn(); <del> Object.defineProperty(node, 'checked', { </del> <ins> Object.defineProperty(node, 'muted', { </ins> get: function () { return nodeValue; },

Discussion:
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --React version: 18.3.0-canary-- radio buttons that toggle in selecting each radio button, is no longer called <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Issues without reproduction steps or code examples may be immediately closed as not actionable. --Link to code example: The following CodeSandbox demonstrates the issue with the current react canary version. The issue is not present when react & react-dom versions are changed to stable 18.2.0 <!-- Please provide a CodeSandbox (), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: --'s prop is not called on subsequent clicks of the input 's prop should be called on subsequent clicks of the input
As far as I an tell this also repros without toggling : So it's just about changing the controlled delayed.
The problem was introduced with . The previous version works.
It looks like it was this change that introduced this bug:
what are ways to fix this issue?
FYI, I find something by investigating, as below: : isn't called because here is falsy in that process. PS: In our case, should be equal to . Diving into the inner functions as the followings. : : : We can find the key is that the tracked value should be different from the value get from () in our case. We can believe the tracked value was not updated after the delayed state change, which cause the issue.

Analysis by reproduction steps (Please visit , which can print the tracked values): : One: checked ( is ), and the tracked value is Two: unchecked, and the tracked value is 'Two', and wait for delayed : is called One: unchecked, and the tracked value is Two: checked, and the tracked value is 'One', and wait for the delayed : is called One: checked, and the tracked value is Two: unchecked, and the tracked value is 'Two', won't call again PS: The tracked value can be updated at the end of the event handler (by ), so Step 2 will result in the correct tracked values. So, I think one solution is to update the tracked value (at the end of the commit mutation phase) when the checked prop changes. I'd like to submit a PR to fix it. Any corrections or suggestions will be appreciated, (for I'm not sure if I miss anything important).
I tried another way to understand what caused the bug. I just checked the between a working commit () and non-working commit () and figured out that the bug happens after removing in function of . just restoring or just adding the bug disappear. Maybe the problem is explained in this is not updated and will result null/undefined and the radio is no more controlled? You can check this . I've also made a change to to start devtools server with a simple radio example. To run the server: run in the root directory and in directory. from to the root directory run from folder execute (better to open another shell for this command) go to