Getting value from store is not reactive.

It seems like I’ve lost a lot since it’s been so long since I worked with Solid JS. Could you help me understand why getParam isn’t reactive?
No description
6 Replies
Brendonovich
Brendonovich5mo ago
looks right, where are you calling getParam? if it's not in a reactive context then that's probably why
musiclover
musicloverOP5mo ago
<MySlider value= {getParam (info)} /> I call getParam to many componetns like this..
Brendonovich
Brendonovich5mo ago
how is MySlider using props.value?
musiclover
musicloverOP5mo ago
interface Props { value?: number } it's just expecting value. because i'm moving my component from vue to solid..
Brendonovich
Brendonovich5mo ago
that's just the type definition, i mean where is it actually using the value. I ask because if it's being read in the component body the it won't be reactive, but it may also be info - where is that coming from?
Mobs
Mobs5mo ago
The problem is you're calling getParam and <MySlider value= {getParam (info)} /> is going to only get called once onMount so getParam wont get called again.
Want results from more Discord servers?
Add your server