S
SolidJS•13mo ago
itsyoboieltr

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
itsyoboieltr
itsyoboieltrOP•13mo ago
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...
itsyoboieltr
itsyoboieltrOP•13mo ago
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
Want results from more Discord servers?
Add your server