Update constant name in useImperative example
User Imperative example has to same ref name in child and in the parent. Causing confusion while understanding the concept.
function FancyInput(props, ref) { const **inputRef** = useRef(); useImperativeHandle(ref, () => ({ focus: () => { inputRef.current.focus(); } })); return <input ref={**inputRef**} ... />; } FancyInput = forwardRef(FancyInput);
`In this example, a parent component that renders <FancyInput ref={inputRef} /> would be able to call inputRef.current.focus().'
Size Changes
📦 Next.js Bundle Analysis
This analysis was generated by the next.js bundle analysis action 🤖
This PR introduced no changes to the javascript bundle 🙌
@sunny minor pr, can you please look into it?
Wrong @sunny I think :)
Wrong @sunny I think :)
updated my comment. can you pls review again?
@sunny shall I close the pr if the change suggested are wrong?
What I meant by “Wrong @sunny” is that you mentioned me, but I am not a reactjs.org maintainer.
@gaearon can you pls review the pr?