SolidJSS
SolidJS2y ago
25 replies
Strange

Refs to children elements?

Quick one. Could have multiple answers.

I have a passthrough component that renders two children elements in a specific layout. I want to grab refs to these two child elements. Currently the way that I am rendering these two child elements are just by props.children[0] and props.children[1], but that doesn't give me a slot to stick a couple of refs in them. How would I go about doing that?
Was this page helpful?