Skip to content

docs(stores): class instances in stores; frozen objects wrap - #1709

Open
ryansolid wants to merge 2 commits into
v2-rebuildfrom
claude/class-instances-in-stores
Open

ryansolid wants to merge 2 commits into
v2-rebuildfrom
claude/class-instances-in-stores

Conversation

@ryansolid

Copy link
Copy Markdown
Member
  • I have read the Contribution guide
  • This PR references an issue (the matching solid PR is linked below)

Description(required)

This PR documents how stores treat class instances, which solidjs/solid#5031 makes official, and a frozen-object change that already shipped:

  • Concepts › Stores gets a new section, "Store a class instance". Getters are reactive reads: they run on the store proxy and track. Methods are actions: called on the store, a method runs on the instance itself, so an actor or an API client keeps working. Called on the draft, a method writes reactively. The section also adds a common problem ("A value computed by a class method never updates": use a getter) and a recap line. The old "Map, Date, or class instance does not track" problem now covers Map and Date only.
  • Reference › createStore caveats: frozen plain objects and arrays now wrap (solid 2.0.1, fix(signals): frozen plain objects and arrays wrap in stores solid#5014), and { shallow: true } is how to keep a value raw. Also adds the getter and method rule.
  • Reference › isWrappable: frozen objects are wrappable.

Merge timing: the frozen-object lines match solid-js 2.0.1. The class getter and method lines describe solidjs/solid#5031, so this PR should merge once that one lands.

Checks: lint-tone reports 0 errors (its 1 warning is on action.mdx, not in this diff). check-examples passes for the changed pages, checked against a solid build with #5031; its one error is a pre-existing import.meta.env error in the router setup page. Prettier is applied.

Related issues & labels


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWMQrQZP9s7AUj6iNXZ
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify

netlify Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for solid-docs-v2 ready!

Name Link
🔨 Latest commit afe5dad
🔍 Latest deploy log https://app.netlify.com/projects/solid-docs-v2/deploys/6afde076fe4ed8cb58a58532
😎 Deploy Preview https://deploy-preview-1709--solid-docs-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants