We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11f6ba6 commit eccd2a1Copy full SHA for eccd2a1
docs/src/pages/use-component-will-receive-update.mdx
@@ -54,6 +54,8 @@ You may also want to read [(Avoid) Notifying parent components about state chang
54
If you need to edit other components' states, write it like this:
55
56
```js
57
+import { flushSync } from 'react-dom'
58
+
59
useComponentWillReceiveUpdate(() => {
60
// Force React to immediately flush scheduled/batched updates
61
flushSync(() => setLocalState(false))
0 commit comments