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
assign that to an click event
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.
3 Replies
thanks for the answer, can you show me an example?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
in solid js customevents are just props, so create a prop named onClick in the child component
then pass the handler to that prop and call the prop in the child