Is there a way to use the <For> component with an array of inputs?
everytime I type in one if the inputs output by <For>, I lose focus, because it gets rerendered 😦
2 Replies
Based on this stackoverflow post, I could make it work:
https://stackoverflow.com/questions/72288357/solidjs-input-field-loses-focus-when-typing
Stack Overflow
SolidJS: input field loses focus when typing
I have a newbie question on SolidJS. I have an array with objects, like a to-do list. I render this as a list with input fields to edit one of the properties in these objects. When typing in one of...
TLDR: do not make a deep copy of the whole store and modify the copied array like you would in react, just use the built in helper methods so you do not recreate the whole array on every key press
some feedback to the solid team: it could be that I missed this, but this probably should be more emphasized somehow when using stores. I believe all people coming from react will do it like I tried initially lol