I have too long Switch, Match
Is there any alternative in this case?
I have 50 components to match..
6 Replies
if the it's just integers then maybe an array?
like
elements[value]()
I thought same solution, but it doesn't work. re-render when changing singnal..
https://www.solidjs.com/tutorial/flow_dynamic maybe this helps?
SolidJS
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.
Thanks delu. Yes, it works really well. I should use MyComponent, instead <MyComponent /> to use inside options..:)
Glad I could help 🙂
Potentially you can also just have a single createMemo and put the logic in there 🤔