Skip to content

feat: introduce more frameworks hooks for other non-react adapters#308

Merged
KevinVandy merged 5 commits intoactionsfrom
more-framework-hooks
Apr 14, 2026
Merged

feat: introduce more frameworks hooks for other non-react adapters#308
KevinVandy merged 5 commits intoactionsfrom
more-framework-hooks

Conversation

@KevinVandy
Copy link
Copy Markdown
Member

🎯 Changes

  • Added the new adapter hook APIs across the framework packages:

    • React:
      • createStoreContext
      • useSelector
      • useValue
      • useSetValue
      • useAtom
      • useCreateAtom
      • useCreateStore
      • useStoreActions
      • shallow
      • deprecated useStore alias
    • Preact:
      • createStoreContext
      • useSelector
      • useValue
      • useSetValue
      • useAtom
      • useCreateAtom
      • useCreateStore
      • useStoreActions
      • shallow
      • deprecated useStore alias
    • Solid:
      • useSelector
      • useValue
      • useSetValue
      • useAtom
      • useStoreActions
      • shallow
      • deprecated useStore alias
    • Vue:
      • useSelector
      • useValue
      • useSetValue
      • useAtom
      • useStoreActions
      • shallow
      • deprecated useStore alias
    • Svelte:
      • useSelector
      • useValue
      • useSetValue
      • useAtom
      • useStoreActions
      • shallow
      • deprecated useStore alias
    • Angular:
      • injectSelector
      • injectValue
      • injectSetValue
      • injectAtom
      • injectStoreActions
      • shallow
      • deprecated injectStore alias
  • Standardized the adapter APIs around the same read/write/action model:

    • selector hook for derived reads
    • value hook for whole-store reads
    • setter hook for write access
    • atom tuple hook for read/write usage
    • actions hook for store actions
    • shallow comparison export for selector optimization
  • Preserved backward compatibility by keeping the old selector APIs as deprecated aliases while pointing docs and examples at the new hooks.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 12, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: aaf2c27e-1fd6-41dc-88a0-32fc6ac38c93

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch more-framework-hooks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 12, 2026

View your CI Pipeline Execution ↗ for commit 255321f

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 31s View ↗
nx run-many --target=build --exclude=examples/** ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-14 18:09:12 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 12, 2026

🚀 Changeset Version Preview

7 package(s) bumped directly, 0 bumped as dependents.

🟨 Minor bumps

Package Version Reason
@tanstack/angular-store 0.10.0 → 0.11.0 Changeset
@tanstack/preact-store 0.12.0 → 0.13.0 Changeset
@tanstack/react-store 0.10.0 → 0.11.0 Changeset
@tanstack/solid-store 0.10.0 → 0.11.0 Changeset
@tanstack/store 0.10.0 → 0.11.0 Changeset
@tanstack/svelte-store 0.11.0 → 0.12.0 Changeset
@tanstack/vue-store 0.10.0 → 0.11.0 Changeset

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 12, 2026

@tanstack/angular-store

npm i https://pkg.pr.new/@tanstack/angular-store@308

@tanstack/preact-store

npm i https://pkg.pr.new/@tanstack/preact-store@308

@tanstack/react-store

npm i https://pkg.pr.new/@tanstack/react-store@308

@tanstack/solid-store

npm i https://pkg.pr.new/@tanstack/solid-store@308

@tanstack/store

npm i https://pkg.pr.new/@tanstack/store@308

@tanstack/svelte-store

npm i https://pkg.pr.new/@tanstack/svelte-store@308

@tanstack/vue-store

npm i https://pkg.pr.new/@tanstack/vue-store@308

commit: 255321f

@KevinVandy KevinVandy merged commit ca743bc into actions Apr 14, 2026
7 checks passed
@KevinVandy KevinVandy deleted the more-framework-hooks branch April 14, 2026 18:11
KevinVandy added a commit that referenced this pull request Apr 14, 2026
* feat: add actions to stores

* ci: apply automated fixes and generate docs

* simplify context hook impl

* ci: apply automated fixes and generate docs

* feat: introduce more frameworks hooks for other non-react adapters (#308)

* feat: introduce more frameworks hooks for other non-react adapters

* new changeset

* ci: apply automated fixes and generate docs

* remove dedicated setValue and useAction hooks. Add new useStore hooks with _

* ci: apply automated fixes and generate docs

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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.

1 participant