Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.1k
Document createRef and forwardRef usage#115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Hey@adrienharnay. One note, this PR doesn't fix#72 entirely, it would be great to include some React component example. Examples from react docs are preferred:https://reactjs.org/docs/forwarding-refs.html constFancyButton=React.forwardRef((props,ref)=>(<buttonref={ref}className="FancyButton">{props.children}</button>));// You can now get a ref directly to the DOM button:constref=React.createRef();<FancyButtonref={ref}>Click me!</FancyButton>; The best place to put it would be in thestateless components section: |
9bfd6f2
toac58144
Compareartyomtrityak commentedMar 23, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
That is not super clear how to use |
Fixes#72