Title: [Content]: Top-Level Array Example · Issue #1094 · solidjs/solid-docs · GitHub
Open Graph Title: [Content]: Top-Level Array Example · Issue #1094 · solidjs/solid-docs
X Title: [Content]: Top-Level Array Example · Issue #1094 · solidjs/solid-docs
Description: 📚 Subject area/topic /concepts/stores.mdx 📋 Page(s) affected (or suggested, for new content) It would be nice if this also showed how to deal with a top-level array in the store. These examples walk to the array as a property of the stor...
Open Graph Description: 📚 Subject area/topic /concepts/stores.mdx 📋 Page(s) affected (or suggested, for new content) It would be nice if this also showed how to deal with a top-level array in the store. These examples wal...
X Description: 📚 Subject area/topic /concepts/stores.mdx 📋 Page(s) affected (or suggested, for new content) It would be nice if this also showed how to deal with a top-level array in the store. These examples wal...
Opengraph URL: https://github.com/solidjs/solid-docs/issues/1094
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Content]: Top-Level Array Example","articleBody":"### 📚 Subject area/topic\n\n/concepts/stores.mdx\n\n### 📋 Page(s) affected (or suggested, for new content)\n\nIt would be nice if this also showed how to deal with a top-level array in the store. These examples walk to the array as a property of the store object but it indicates that the store could also be an array and the syntax for dealing with a top level array seems like it would have to be different. \n\n### 📋 Description of content that is out-of-date or incorrect\n\n```\nconst [store, setStore] = createStore({\n userCount: 3,\n users: [ ... ],\n})\n\nsetStore(\"users\", (currentUsers) =\u003e [\n ...currentUsers,\n {\n id: 3,\n username: \"michael584\",\n location: \"Nigeria\",\n loggedIn: false,\n },\n])```\n\nIf the example users array was the store itself (`createStore([...users])`) then wouldn't most of the modifying examples be different?\n\n### 🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)\n\n_No response_","author":{"url":"https://github.com/chasingtheflow","@type":"Person","name":"chasingtheflow"},"datePublished":"2025-02-24T17:45:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1094/solid-docs/issues/1094"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7c57784c-695b-9af8-71df-adf49ec573d3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8722:EBF9C:22C9A05:2DB3EA8:6992D441 |
| html-safe-nonce | 3fe0eb5cf965a11d12f8be4279e487d505064022124f2b129365bf1090af7a55 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzIyOkVCRjlDOjIyQzlBMDU6MkRCM0VBODo2OTkyRDQ0MSIsInZpc2l0b3JfaWQiOiIzMTA2MDU1NzIzODY1NTI3MzYxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3d3f1803e5c36681f5ac28535fc69358cc1ff05c01450ee1147275eb44ac7060 |
| hovercard-subject-tag | issue:2875729482 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/solidjs/solid-docs/1094/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3d0bdb167244e9d51733edbd5887875f780e5cd0c9d5a952adaf0965680f5c3a/solidjs/solid-docs/issues/1094 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3d0bdb167244e9d51733edbd5887875f780e5cd0c9d5a952adaf0965680f5c3a/solidjs/solid-docs/issues/1094 |
| og:image:alt | 📚 Subject area/topic /concepts/stores.mdx 📋 Page(s) affected (or suggested, for new content) It would be nice if this also showed how to deal with a top-level array in the store. These examples wal... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | chasingtheflow |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/solidjs/solid-docs git https://github.com/solidjs/solid-docs.git |
| octolytics-dimension-user_id | 79226042 |
| octolytics-dimension-user_login | solidjs |
| octolytics-dimension-repository_id | 477506519 |
| octolytics-dimension-repository_nwo | solidjs/solid-docs |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 477506519 |
| octolytics-dimension-repository_network_root_nwo | solidjs/solid-docs |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 84dcb133269e3cfe6e0296cc85fbacb92cae92bb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width