SolidJSS
SolidJSโ€ข3y agoโ€ข
7 replies
tehquickness

Item in store array being overwritten

I have created the following store: { elements: Element[], selectedElement: Element } . When an element from the array is clicked it is assigned to selectedElement. If a new item is selected and assigned to selectedElement, it actually overwrites the value of the previously selected element in the array.

Is this the expected behavior?
Was this page helpful?