const [expressions, setExpressions] = createStore<Expression[]>([]) (...) setExpressions( //todo the problem seems to be here somewhere: expression => expression.id == id, // first we filter the array to those Expression objects which match the id specified 'value', // Then we select the value member of Expression value // Then we pass the new value to be set )
const [expressions, setExpressions] = createStore<Expression[]>([]) (...) setExpressions( //todo the problem seems to be here somewhere: expression => expression.id == id, // first we filter the array to those Expression objects which match the id specified 'value', // Then we select the value member of Expression value // Then we pass the new value to be set )
I've tried double checking the path syntax for SetStoreFunction (setExpressions) against the docs, and I still believe it should work.
In the full code, I'm expecting that when I call getExpressionSetValue(id), it returns a setValue string => void function on the expression with that id. And that I can call setValue("abc") to set the value on that expression to abc. This should allow me to type into the text field to update the value. But instead no change happens when I type into the text field.
I'm also not sure how to dive deeper into debugging this issue (kinda new to web dev) so I'm open to suggestions there as well (leave a comment? many thanks).
Full code is at the bottom. I'm trying to modify an element of a SolidJS store using the SetStoreFunction (setExpressions). The SetStoreFunction accepts 'Path Syntax' as described in the docs: http...
Solid is a purely reactive library. It was designed from the ground up with a reactive core. It's influenced by reactive principles developed by previous libraries.