({children = null})
| 19 | |
| 20 | // $FlowFixMe[missing-local-annot] |
| 21 | function WarnOnUpdate({children = null}) { |
| 22 | const didMountRef = useRef(false); |
| 23 | useEffect(() => { |
| 24 | if (didMountRef.current) { |
| 25 | console.warn('This warning fires on every update'); |
| 26 | } else { |
| 27 | didMountRef.current = true; |
| 28 | } |
| 29 | }); |
| 30 | return children; |
| 31 | } |
| 32 | |
| 33 | // $FlowFixMe[missing-local-annot] |
| 34 | function WarnOnUnmount({children = null}) { |