mirror of
https://github.com/Effect-TS/effect.git
synced 2026-12-04 03:35:36 +08:00
@effect/atom-solid
SolidJS bindings for Atom, the reactive state management modules for Effect.
Installation
npm install effect @effect/atom-solid
Solid versions
Requires Solid 2 (solid-js 2.0 or later). Solid 1 is no longer supported.
Migrating from Solid 1
-
useAtomResourcewas removed because Solid 2 has nocreateResource. Read theAsyncResultatom withuseAtomValueand match on the result:const user = useAtomValue(() => userAtom) const name = () => AsyncResult.match(user(), { onInitial: () => "Loading...", onFailure: () => "Could not load user", onSuccess: ({ value }) => value.name }) -
Solid 2 contexts have no
.Provider. Replace<RegistryContext.Provider value={registry}>with<RegistryContext value={registry}>, or use<RegistryProvider>.
Links
- Website: documentation, guides, and news.
- Reference: API documentation for this package.
- Discord: ask questions, share what you're building, and talk to the core team.
- Community: meetups and events, or bring Effect to your own.
- Issues: bug reports and feature requests.
Let's talk
Whether your team is considering Effect, rolling it out, or already running it in production, we'd love to hear from you: what you're building, what works, and what you need from Effect next.
- Talk to the maintainers. Introduce your team on Discord or email contact@effectful.co. We're happy to connect privately on Slack or Discord for feedback and help with adoption.
- Production support. We're exploring how to better support teams running Effect in production. If your organization has specific support needs, let's discuss them.
- Adoption help. Our adoption partners offer implementation, consulting, team extension, training, and commercial support.