-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Can I use it without ref in functional components #363
Comments
Hello. What is the problem you are facing with refs? |
I am facing bellow error.
|
This is main component:
This is Printable component which is also functional based:
All the parent components are functional components. So, How can I use with my components. |
Two options, as noted in #96: you can wrap the entire component to print in a native dom element such as a |
I have converted print component into forward ref like component. And now I am facing below issue when click on print button. |
At the end I have converted my print component into class component and now the print is working. |
I'm glad you were able to get it working using a class component. I hope to have better support for functional components in the next major version of the package.
I'm not sure I understand. Do you mean when the component renders? |
I have find solution for this too, thanks for your support, will get touch in future if needed. |
Glad you found a solution! Please feel free to reach out if you run into any other issues. Have a good day 😄 |
me too, How to solve such problems,Please? |
@jackywq the best solution for now is to use a class-based component |
I have a question in relation to this. I am using a functional component with ref, as I have to use a hook ( As such, for the
I am trying to use a list of objects with I tried some variations with the index, but nothing is working. How would be possible to use indexes with |
Any progress on using this with functional components? |
If is it possible, Can I have any example by doing this.
The text was updated successfully, but these errors were encountered: