fragerdaz
refetch() from child component
I createResource (with refetch option) in my parent component.
I render a child component in this parent and want to call the parent's refetch().
Obviously, that doesn't work because refetch() isn't defined in the child. How can I trigger the parent's refetch() from the child component?
3 replies
render(() => { <Component />, element }) throws an error when including props
render(() => { <Component />, element })
This works if I only reference the component as <Component />
However, I get an error when using <Component id='xyz' />
Error: Uncaught TypeError: Cannot read properties of undefined (reading 'firstChild')
6 replies