SolidJSS
SolidJSβ€’2y agoβ€’
25 replies
πŸŽ„ jolly proudparrot2

<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>


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>

The count goes up, but no new elements are being displayed. Any suggestions would be great :)
Was this page helpful?