Skip to content

[Content]: Modifying store arraysΒ #1183

Open
@JasonHassold

Description

@JasonHassold

πŸ“š Subject area/topic

Stores

πŸ“‹ Page(s) affected (or suggested, for new content)

https://docs.solidjs.com/concepts/stores#modifying-values-in-arrays

πŸ“‹ Description of content that is out-of-date or incorrect

This example seems to imply that the 2 options for setting the store array are different syntaxes to achieve the same thing, or at least doesn't specify that they are different.

The first option creates a new array always triggering reactivity, but the second option modifies the existing array and only triggers reactivity for things tracking the contents of the array. Some clarification about the difference and how the reactivity/tracking behaves in the 2nd option would be helpful.

Image

πŸ–₯️ Reproduction in StackBlitz (if reporting incorrect content or code samples)

https://playground.solidjs.com/anonymous/223c2f23-dbed-4377-8e07-1e1f335b6c5c

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomershelp wantedLooking for assistance on this issuesolidRelated to core Solid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions