Closed mareksed closed 4 months ago
Even though we currently don't support refs on the top level, we already support passing refs with the attributes prop. It's still a good idea to start enabling that on the top level with React 19 supporting refs without forwarding
Ahh ofcourse, should have dug deeper. Intuitively I ruled attributes out because I thought they are only for standard html props, but I see how it is designed now, makes sense. Thx this should work for all the use cases that top level ref does.
and +1 for react19 to make them top level.
Is your feature request related to a problem? Please describe. I cannot use refs with View components
Describe the solution you'd like Use React.forwardProps with View component
Describe alternatives you've considered At the moment we can always wrap the component with a div and pass ref to it, but it would be nice if this was supported out of the box.