SolidJSS
SolidJSโ€ข3y agoโ€ข
5 replies
jericofx

Info from Children to Parent

Hi guys sorry for my noobish question, i came from svelte where to pass something from the children to the parent (in this case a function), in the children i do
export let handler = ()=>{}


assign that to an click event
<div on:click={handler}></div>

and in the parent i can just call the handler and thats it.
How i can do the same on solid?, i try to do the same approach with an onClick={handler} or onClick={[handler]} on the children and try to print a simple log on the parent without luck.
Was this page helpful?