Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forwarding References/createRef alternate syntax #32

Closed
xaviergonz opened this issue Jul 1, 2018 · 1 comment
Closed

Forwarding References/createRef alternate syntax #32

xaviergonz opened this issue Jul 1, 2018 · 1 comment

Comments

@xaviergonz
Copy link
Contributor

xaviergonz commented Jul 1, 2018

Rather than

private rootRef: React.RefObject<HTMLDivElement> = React.createRef();

this can be also used:

private rootRef = React.createRef<HTMLDivElement>();

which is a bit shorter

@ghost
Copy link

ghost commented Jul 1, 2018

Hi @xaviergonz ,
Thanks for your issue. Do you have the chance to send a PR 🎉 ?

Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant