dillon1000/react

Commit

[tests] <StrictMode /> nested in tree is broken (#31825)

Adds a test that shows using <StrictMode /> anywhere outside of the root
node will not fire strict effects.

This works:

```js
root.render(
  <StrictMode>
    <App>
      <Children />
    </App>
  </StrictMode>
);
  ```
  
  This does not fire strict effects on mount:
```js
root.render(
  <App>
    <StrictMode>
      <Children />
    </StrictMode>
  </App>
);
```
Browse files
Changed paths1 file
First-parent comparison
M packages/react/src/__tests__/ReactStrictMode-test.internal.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…