How to keep an active item for a list of items in SolidJS?
https://stackoverflow.com/questions/79209391/how-to-keep-an-active-item-for-a-list-of-items-in-solidjs
My app has a list of items where each item is an object, and one of the items can be in active state. I'm using SolidJS.
My first idea was to represent the whole state of the app in a store:
This is not working, because when I change the activeItem, it modifies the previously active item.
What's the best practice in this situation? Store the active item outside the store? Store only ID of the active item, and find it on every access? Something else?
Stack Overflow
How to keep an active item for a list of items in SolidJS?
My app has a list of items where each item is an object, and one of the items can be in active state. I'm using SolidJS.
My first idea was to represent the whole state of the app in a store:
const ...
1 Reply
How about