How Can I Pass a Ref Down To A Child Component and Have It Not Just Be The Starting Value
Hello,
I have a bit of a odd question and 99% of the answers for this I have seen are for class components and do not translate to functional components. I am essentially trying to do the following:
The issue here is that at the time the ref gets passed down its still null and ref does not cause any sort of rerender on changed value, this actually leads to a super weird behaviour where what I want to do in
MyCoolComponentChild
works, but only after next does a HMR reload after a change to MyCoolComponent
since the ref get's re-passed down from the parent.
If anyone could help me find a good way to do this it would be much appreciated! Thanks!0 Replies