best way to update multiple children in a multi timer app?

Hey, I've been trying to Google this without much success. I'm trying to create a timer app that updates an array of components each tick. I'm wondering how best to go about doing this. I am thinking of having a parent component which somehow updates a child's internal time value but I don't know what would be the best method to do this. Can anyone give me any guidelines?
1 Reply
Andreas Roth
Andreas Roth4d ago
Solid is still a declarative framework. You don't imperatively call functions on children. You pass data down, and let the children decide what they want to do. So your parant would manage the time and would pass the time value down to children and if children need to manipulate the time (like reset, stop, start etc.) you simply pass down functions from the parent to the child. https://playground.solidjs.com/anonymous/9d2a881b-f396-487e-ad93-35ea7f34673f
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
Want results from more Discord servers?
Add your server