jericofx
jericofx
SSolidJS
Created by jericofx on 1/20/2023 in #support
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 = ()=>{}
export let handler = ()=>{}
assign that to an click event
<div on:click={handler}></div>
<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.
6 replies