Any risks with forwardRef? #5102
Unanswered
keithburgie-rts
asked this question in
Q&A
Replies: 1 comment
-
Two years late, but while working on a design system (package) which wraps Chakra UI, we noticed that anything wrapped by forwardRef was not able to be tree shaken by NextJS. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a downside to wrapping a component in forwardRef? I'm maintaining a library that extends Chakra UI and keep adding forwardRef to components as needed. I'm considering just wrapping all containers, buttons, etc. with forwardRef in case of future need. How will I be shooting myself in the foot?
Beta Was this translation helpful? Give feedback.
All reactions