passing signal to component
i try to pass a signal set function to a component but when i try to use the function inside the component i only get a props.settask is not a function error
the component inside the main app
the component
8 Replies
You're executing the function in when you pass it in
So you're essentially passing in undefined
settodo={settasks}
should workchanged it still getting the same error
oh yeah, I didn't notice that lol
is this one of thos cases where sloid js only acpets one certian namening ?
It's because you've named it settodo when you passed it as props
The name of the function doesn't get passed, only function itself
i fell incredibly retarted right now but atleast it works now
yep :)
thanks