|
I have multiple Components with each has an id (string) and status (string) and I need to store the status as signal. Probably Solid Store should be used. Use case example: const [store, setStore] = createStore(<TO_IMPLEMENT>)
// get by id to retrieve status
store()[<ID_VALUE>]
// set by id to save status
// only Component with related id should re-render
store(id, <STATUS_VALUE>)How can I do? |
Answered by
atk
Jul 16, 2024
Replies: 1 comment
|
You can just do const [store, setStore] = createStore({});
// set state for your component
setStore(id, state);
// retrieve state for component
store[id] |
0 replies
Answer selected by
rtritto
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can just do