Repository navigation
Is there a way to use Custom Trigger without using forwardRef, which is scheduled to be deprecated in React 19? #34615
Answered
by
khmakoto
お餅のCreeeper (creeper-0910)
asked this question in
Q&A
|
https://react.fluentui.dev/?path=/docs/components-dialog--docs#custom-trigger |
Answered by
khmakoto
Jun 10, 2025
Replies: 1 comment
|
In versions of React previous to 19 you needed |
0 replies
Answer selected by
tudorpopams
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In versions of React previous to 19 you needed
forwardRefin order to haverefavailable in the component. Starting with React 19 you will haverefavailable by default in function components without needing to useforwardRef, so you would just use the component with its automatic access torefwithout having to useforwardRefat all.https://react.dev/blog/2024/12/05/react-19#ref-as-a-prop