With React now introducing the ability to use ref forwarding it seems like this would be a wonderful opportunity to update styled-components to use, in certain instances.
An example of this is a component I'm working on where I'm using the styled() HOF. When I try to access the ref of the child component I'm getting the style-component class reference instead. Instead I've had to implement a different solution, using childRef and then consuming that in my child component.
It _seems_ like if we were able to just pass in a ref and styled-components forwarded that on, at least in the instance of using the styled()HOF, it would simplify this problem quite a bit.
Luckily we were involved in the RFC itself and we didn鈥檛 have to do anything to support this apart from a little fix which has just been merged and will land soon :) https://github.com/styled-components/styled-components/pull/1658
We鈥檙e now interested though in replacing our existing solution, the innerRef prop entirely with either a new API are manual ref forwarding
Most helpful comment
Luckily we were involved in the RFC itself and we didn鈥檛 have to do anything to support this apart from a little fix which has just been merged and will land soon :) https://github.com/styled-components/styled-components/pull/1658
We鈥檙e now interested though in replacing our existing solution, the innerRef prop entirely with either a new API are manual ref forwarding