proudparrot2
proudparrot2
Explore posts from servers
SSolidJS
Created by proudparrot2 on 3/29/2024 in #support
<Index> with stores
Hello there, I'm building an application where I have a store defined in a separate non-component file which I have an array of objects being stored in there and being updated on a function. I'm mapping that store using <Index> using the setup below (openWindows is the store)
<Index each={openWindows}>{(data) => <p>component goes here</p>}</Index>
<Index each={openWindows}>{(data) => <p>component goes here</p>}</Index>
It starts out as an empty array, but when I add items to the store, only the first index in the store ends up being displayed. I'm verifying this by checking the length of openWindows
<p>{openWindows().length}</p>
<p>{openWindows().length}</p>
The count goes up, but no new elements are being displayed. Any suggestions would be great :)
26 replies