SolidJSS
SolidJSโ€ข3y agoโ€ข
11 replies
Grahf

Pass ref in routeData

Happy Saturday. Struggling with what I hope is a simple problem.

I'm trying to get a ref passed to a grand child component. It keeps showing up as undefined. Ref works fine in the grand parents where it's set to a div.

In the grand parent:
let ref export function routeData() { return ref } In the grand child: const test = useRouteData()

createEffect(() => {
console.log('test is: ', test)
})`

I know the ref eventually gets a value so not sure why it's only showing up as undefined in the grand child
Was this page helpful?