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
loadable-components and refs? #108
Comments
Yes it actually doesn't handle refs but it is on feature list. |
Would it be a lot of work to add? AFAICT would it just be adding ref forwarding ala React manual (https://reactjs.org/docs/forwarding-refs.html)? I'm not sure how server-side rendering would factor into this though. |
No it should be pretty simple to add. I think forwarding ref is the best thing to do. Even if it is not compatible with React <16, it is OK for me. But we have to be careful of compatibility, OK to not support refs in React <16 but not OK to drop support of React <16. |
+1 |
2 similar comments
+1 |
+1 |
Refs are not supported in v3 but I plan to add support soon. Feel free to open a new issue. I close it because this one was about v2. |
@neoziro is this supported now? It seems like it is from the code and trying it out. |
Yes refs are supported out of the box in v5, you can transparently use them. |
hey,how can i use refs?I use a ref to loadable compents, but get 'null'; |
For others that need this, you can use |
As it stands loadable-components doesn't handle refs (correct me if I'm wrong). Are there any plans to? My intended use case is to delay-load a component that needs a ref, and I don't really care about the ref until after it's loaded. (ie. I only care about the underlying component's ref, not the ref of the loadable or the loading component).
The text was updated successfully, but these errors were encountered: