Open LexRiver opened 4 years ago
setRef
was never be a public api.
You can try to use child.getDomNode()
but I wouldn't recommend using such a way since there's no any guarantee that this.children
is an array of component nodes.
Well actually it's in the docs https://github.com/dfilatov/vidom/wiki/ComponentNode-API
child.getDomNode()
returns null
for me
Sorry for outdated doc (
child.getDomNode() returns null for me
Maybe because you call it before child is rendered to DOM?
How can I get a DOM ref of a child? Previously I was able to get by
.setRef()
, but now I'm getting errorchild.setRef is not a function
even for class-component children. What am I missing?