diff --git a/.trae/documents/plan_20260209_024840.md b/.trae/documents/plan_20260209_024840.md
new file mode 100644
index 00000000..fbb963d7
--- /dev/null
+++ b/.trae/documents/plan_20260209_024840.md
@@ -0,0 +1,34 @@
+Voy a proceder con la actualización mayor a **v0.3.0** de `@effectify/solid-effect-atom`, implementando los cambios solicitados para alinearse con `effect-smol` y soportar Effect v3 mediante `@effect-atom/atom`.
+
+### Plan de Implementación Detallado
+
+1. **Reingeniería del Paquete (`packages/solid/effect-atom`)**:
+ * **Limpieza**: Eliminar archivos obsoletos (`primitives.ts`, `advanced-hooks.ts`, `solid-hydration.ts`, `ssr-utils.ts`, `context.ts`).
+ * **Nuevo Núcleo (Dash Case)**:
+ * Crear `src/hooks.ts`: Portado de `Hooks.ts` de `effect-smol`.
+ * Crear `src/registry-context.ts`: Portado de `RegistryContext.ts`.
+ * Actualizar `src/index.ts`: Exportar las nuevas primitivas.
+ * **Adaptación de Imports**:
+ * Reemplazar `effect/unstable/reactivity/*` por `@effect-atom/atom/*`.
+ * Asegurar compatibilidad con `effect` ^3.19.16.
+
+2. **Pruebas Unitarias**:
+ * Portar `test/index.test.tsx` desde `effect-smol`.
+ * Adaptar los imports para testear la implementación local (`../src/index.js`).
+ * Verificar que todos los tests pasen con `vitest`.
+
+3. **Actualización de Dependencias**:
+ * Actualizar `package.json` a la versión `0.3.0`.
+ * Verificar peerDependencies: `@effect-atom/atom` y `effect`.
+
+4. **Ejemplo en `apps/solid-example`**:
+ * Crear una nueva ruta de demostración: `src/routes/atom-demo.tsx`.
+ * Implementar ejemplos de uso de `useAtom`, `useAtomValue`, `useAtomInitialValues` y `RegistryProvider`.
+
+5. **Migración de Documentación**:
+ * Mover y reescribir la documentación en la aplicación de documentación (`apps/docs`).
+ * Crear/Actualizar: `apps/docs/src/content/docs/solid/effect-atom.mdx` (o estructura similar).
+ * Documentar la nueva API v0.3.0 y los breaking changes.
+
+### Confirmación
+El resultado será un paquete más ligero, performante y alineado con el futuro estándar de Effect, totalmente documentado y testeado. ¿Procedemos?
\ No newline at end of file
diff --git a/README.md b/README.md
index 9008a77a..73fb8006 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
# Effectify
+[Documentation](https://devx-op.github.io/effectify/)
+
Monorepo of utilities for integrating [Effect](https://effect.website/) with different frameworks and libraries.
## Packages
diff --git a/apps/docs/astro.config.ts b/apps/docs/astro.config.ts
index 57f5ae13..efc45298 100644
--- a/apps/docs/astro.config.ts
+++ b/apps/docs/astro.config.ts
@@ -48,7 +48,7 @@ export default defineConfig({
},
{
label: "Packages",
- items: ["solid/packages/solid-query", "solid/packages/solid-ui", "solid/packages/chat-solid"],
+ items: ["solid/packages/solid-effect-atom", "solid/packages/solid-query", "solid/packages/solid-ui"],
},
{
label: "Reference",
diff --git a/apps/docs/src/content/docs/es/solid/packages/chat-solid.md b/apps/docs/src/content/docs/es/solid/packages/chat-solid.md
deleted file mode 100644
index d3125542..00000000
--- a/apps/docs/src/content/docs/es/solid/packages/chat-solid.md
+++ /dev/null
@@ -1,177 +0,0 @@
----
-title: "@effectify/chat-solid"
-description: Componentes y servicios de chat en tiempo real para aplicaciones SolidJS
----
-
-# @effectify/chat-solid
-
-El paquete `@effectify/chat-solid` ofrece componentes y servicios de chat en tiempo real para aplicaciones SolidJS. Construido con Effect para un manejo de estado robusto y SolidJS para actualizaciones reactivas de UI, incluye soporte WebSocket, persistencia de mensajes y gestión de usuarios.
-
-## Instalación
-
-```bash
-npm install @effectify/chat-solid
-```
-
-**Peer Dependencies:**
-
-```bash
-npm install @effectify/solid-query @effectify/chat-domain solid-js
-```
-
-## Uso básico
-
-### Componente de chat simple
-
-```tsx
-import { ChatRoom } from "@effectify/chat-solid/components/chat-room"
-import { ChatProvider } from "@effectify/chat-solid/components/chat-provider"
-
-function App() {
- return (
-
Count: {count()}
+Doubled: {doubled()}
+{error.message}
- -Count: {count()}
+Doubled: {doubled()}
+{count()}
+{doubled()}
+Derived from counter value * 2
+"{text()}"
+Initialized via useAtomInitialValues
+Forces re-evaluation/reset of the atom
+ +Count: {state().count}
+Name: {state().name}
+{count()}
+ +Manually mounts an atom without reading its value.
++ Demonstrating @effectify/solid-effect-atom v0.3.0 +
+ +Count: {count()}
- -Hello, {name()}!
+```ts +import * as Atom from "@effect-atom/atom/Atom" + +const counterAtom = Atom.make(0) ``` ### useAtom -Get both the current value and a setter function for an atom. +Hook to read and write an atom. Similar to Solid's `createSignal`. ```tsx -const [count, setCount] = useAtom(() => countAtom) -``` +import { useAtom } from "@effectify/solid-effect-atom" -### useAtomSet - -Get only the setter function for an atom. +function Counter() { + const [count, setCount] = useAtom(counterAtom) -```tsx -const setCount = useAtomSet(() => countAtom) + return +} ``` -## Advanced Features - -### Async Atoms +### useAtomValue -Handle async operations with built-in loading states: +Hook to only read an atom's value. You can pass a selector function to transform the value (computed). ```tsx -import { Effect } from "effect" -import { useAtomSuspenseResult } from "@effectify/solid-effect-atom" - -const dataAtom = Atom.fn(() => - Effect.gen(function*() { - const response = yield* Effect.promise(() => fetch("/api/data")) - return yield* Effect.promise(() => response.json()) - }) -) +import { useAtomValue } from "@effectify/solid-effect-atom" -function AsyncData() { - const result = useAtomSuspenseResult(() => dataAtom) +function Display() { + const count = useAtomValue(counterAtom) + const doubled = useAtomValue(counterAtom, (n) => n * 2) return (Loading...
} - {result.error &&Error: {result.error.message}
} - {result.data &&Data: {JSON.stringify(result.data)}
} +Count: {count()}
+Doubled: {doubled()}
{fullName()}
+function ResetButton() { + const setCount = useAtomSet(counterAtom) + return } ``` -## Performance Benefits - -SolidJS's fine-grained reactivity system means that atom-solid can update only the specific parts of your UI that depend on changed atoms, without re-rendering entire components. - -### Benchmark Results - -Based on our performance benchmarks: - -- **Atom Creation**: ~2M ops/sec -- **Registry Get**: ~6M ops/sec -- **Registry Set**: ~4M ops/sec -- **Computed Atoms**: ~454K ops/sec -- **Subscriptions**: ~1M ops/sec -- **Memory Usage**: ~5KB per 1000 atoms +### useAtomSubscribe -Run benchmarks yourself: `pnpm benchmark` +Subscribes to atom changes manually. Useful for side effects (logging, analytics, etc.). -### Comparison with React - -| Feature | atom-react | atom-solid | -| -------------- | ---------------------- | -------------------- | -| Re-renders | Component re-renders | Fine-grained updates | -| Performance | Good | Excellent | -| Bundle size | ~15kb | ~12kb | -| Learning curve | Familiar to React devs | SolidJS concepts | +```tsx +import { useAtomSubscribe } from "@effectify/solid-effect-atom" -## Migration from atom-react +function Logger() { + useAtomSubscribe(counterAtom, (val) => { + console.log("Counter changed:", val) + }) + return null +} +``` -### Key Differences +### useAtomMount -#### 1. **Hook Signatures** +Manually mounts an atom. Useful if you want to keep an atom alive in the registry without rendering its value. ```tsx -// atom-react -const value = useAtomValue(myAtom) +import { useAtomMount } from "@effectify/solid-effect-atom" -// atom-solid -const value = useAtomValue(() => myAtom) +function Keeper() { + useAtomMount(counterAtom) + return null +} ``` -#### 2. **Return Values** +### useAtomInitialValues + +Useful for SSR or initializing state from props. ```tsx -// atom-react - Direct values -const count = useAtomValue(countAtom) -returnLoading data...
} - {result.error && ( -- Error: {result.error.message} -
- )} - {result.data && ( -{JSON.stringify(result.data, null, 2)}
- Loading...
} - {result.error &&Error: {result.error.message}
} - {result.data && ( -{result.data}
- -Attempting operation...
} - {result.error && ( -- Operation failed: {result.error.message} -
- -- {result.data} -
- )} -Registry timeout resolution: {registry.timeoutResolution}ms
-Default idle TTL: {registry.defaultIdleTTL}ms
-{JSON.stringify(value(), null, 2)}
- Hydration status: {isHydrated() ? "Hydrated" : "SSR"}
- {/* Your components */} -{err.stack}
- {props.product.description}
-${props.product.price.toFixed(2)}
- -${props.item.product.price.toFixed(2)}
-Your cart is empty
: ( - <> -Total: {stats().total}
-Completed: {stats().completed}
-Remaining: {stats().remaining}
-Progress: {Math.round(stats().completionRate * 100)}%
-Loading user...
- if (current.error) returnError: {String(current.error)}
- - return ( -{current.data.email}
- -Loading...
- if (current.error) returnError loading data
- return{JSON.stringify(current.data, null, 2)}
- })()}
- Loading...
- - if (current.data?.error) { - return ( -Failed to load data: {current.data.error}
- -{err.message}
- -Count: {count()}
- -Count: {count()}
- - - -Base: {base()}
-Doubled: {doubled()}
-Loading...
- if (current.error) returnError: {String(current.error)}
- returnData: {current.data}
- })()} - -Count: {count()}
- -Name: {name()}
-} -``` - -### useAtom - -Get both the current value and a setter function for an atom. - -```tsx -import { useAtom } from "@effectify/solid-effect-atom" - -function NameInput() { - const [name, setName] = useAtom(() => nameAtom) - - return ( - setName(e.currentTarget.value)} - /> - ) -} -``` - -### useAtomSet - -Get only the setter function for an atom. - -```tsx -import { useAtomSet } from "@effectify/solid-effect-atom" - -function ResetButton() { - const resetName = useAtomSet(() => nameAtom) - - return ( - - ) -} -``` - -## Advanced Usage - -### Async Atoms with Suspense - -Handle async atoms with built-in loading states. - -```tsx -import { useAtomSuspenseResult } from "@effectify/solid-effect-atom" - -function AsyncData() { - const result = useAtomSuspenseResult(() => dataAtom) - - return ( -Loading...
} - {result.error &&Error: {result.error.message}
} - {result.data &&Data: {JSON.stringify(result.data)}
} -Hello, {name()}!
-} -``` - -#### With Transform Function - -```tsx -const countAtom = Atom.make(5) - -function DisplayDoubled() { - const doubled = useAtomValue(() => countAtom, (count) => count * 2) - - returnDoubled: {doubled()}
-} -``` - -#### With Computed Atoms - -```tsx -const firstNameAtom = Atom.make("John") -const lastNameAtom = Atom.make("Doe") -const fullNameAtom = Atom.make((get) => `${get(firstNameAtom)} ${get(lastNameAtom)}`) - -function DisplayFullName() { - const fullName = useAtomValue(() => fullNameAtom) - - returnFull name: {fullName()}
-} -``` - ---- - -## useAtom - -Get both the current value and a setter function for an atom. - -### Signature - -```typescript -export const useAtom: ( - atomFactory: () => Atom.Writable, -) => readonly [Accessor, (value: A | ((prev: A) => A)) => void] -``` - -### Parameters - -- `atomFactory`: A function that returns a writable atom - -### Returns - -A tuple containing: - -1. `Accessor`: The current atom value -2. `(value: A | ((prev: A) => A)) => void`: Setter function - -### Examples - -#### Basic Usage - -```tsx -import { Atom } from "@effect-atom/atom" -import { useAtom } from "@effectify/solid-effect-atom" - -const countAtom = Atom.make(0) - -function Counter() { - const [count, setCount] = useAtom(() => countAtom) - - return ( -Count: {count()}
- - -Count: {count()}
- - -Loading...
- - return ( -{userData.email}
-{JSON.stringify(data(), null, 2)}
- {error.message}
- -