From bb6fac4ea67d8ef03f4bca1cd374a87c19d71f4c Mon Sep 17 00:00:00 2001 From: aose-yuu Date: Sun, 24 May 2026 11:41:15 +0900 Subject: [PATCH 1/2] docs: link use package references --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 32d2e73..fd8fff4 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,8 @@ Inspired by: npm install @sigrea/core ``` -Install `@sigrea/use` too if you copy examples that use helpers from that -package, such as `createEvents`. +Install [`@sigrea/use`](https://www.npmjs.com/package/@sigrea/use) too if you +copy examples that use helpers from that package, such as `createEvents`. ## Adapters @@ -160,7 +160,9 @@ Child molecules are internal dependencies. Prefer returning only the outputs ### Controlled values with a controller molecule -This example uses `createEvents` from `@sigrea/use`. +This example uses +[`createEvents`](https://github.com/sigrea/use/blob/main/packages/use/createEvents/index.md) +from `@sigrea/use`. ```ts import { From fd52a12f6f6fd334ed00e968450302a1e3f1eaae Mon Sep 17 00:00:00 2001 From: aose-yuu Date: Sun, 24 May 2026 11:51:22 +0900 Subject: [PATCH 2/2] docs: tidy core README links --- README.md | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index fd8fff4..22ed901 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,30 @@ # @sigrea/core

- Sigrea mascot + Sigrea mascot

Sigrea core provides reactive primitives, deep signals, and scope-based molecule lifecycles. It is built on [alien-signals](https://github.com/stackblitz/alien-signals). -- **Core primitives.** `signal`, `computed`, `toSignal`, `deepSignal`, `watch`, and `watchEffect`. +- **Core primitives.** `signal`, `computed`, `toSignal`, `deepSignal`, + `watch`, and `watchEffect`. - **Lifecycles.** `Scope`, `onMount`, and `onUnmount` for cleanup boundaries. - **Molecules.** `molecule()` is a lifecycle container that doesn't render UI. - **Composition.** Build molecule trees via `get()`. -- **Testing.** `trackMolecule` + `disposeTrackedMolecules` helps clean up molecule instances in tests. +- **Testing.** `trackMolecule` + `disposeTrackedMolecules` helps clean up + molecule instances in tests. Inspired by: - [Vue 3](https://vuejs.org/): deep reactivity and scope control - [nanostores](https://github.com/nanostores/nanostores): store-centric architecture -- [bunshi](https://github.com/saasquatch/bunshi): molecule concepts and `get()`-based parent-child graph design +- [bunshi](https://github.com/saasquatch/bunshi): molecule concepts and + `get()`-based parent-child graph design ## Table of Contents @@ -44,10 +51,13 @@ copy examples that use helpers from that package, such as `createEvents`. Official adapters connect Sigrea molecules and signals to UI frameworks: -- **[@sigrea/vue](https://github.com/sigrea/vue)**: Vue 3.4+ composables (`useMolecule`, `useSignal`, `useMutableSignal`, `useDeepSignal`) -- **[@sigrea/react](https://github.com/sigrea/react)**: React 18+ hooks (`useMolecule`, `useSignal`, `useComputed`, `useDeepSignal`) +- **[@sigrea/vue](https://github.com/sigrea/vue)**: Vue 3.4+ composables + (`useMolecule`, `useSignal`, `useMutableSignal`, `useDeepSignal`) +- **[@sigrea/react](https://github.com/sigrea/react)**: React 18+ hooks + (`useMolecule`, `useSignal`, `useComputed`, `useDeepSignal`) -Each adapter binds molecule lifecycles to component lifecycles and synchronizes signal subscriptions with the framework's reactivity system. +Each adapter binds molecule lifecycles to component lifecycles and synchronizes +signal subscriptions with the framework's reactivity system. ## Quick Start @@ -160,9 +170,8 @@ Child molecules are internal dependencies. Prefer returning only the outputs ### Controlled values with a controller molecule -This example uses -[`createEvents`](https://github.com/sigrea/use/blob/main/packages/use/createEvents/index.md) -from `@sigrea/use`. +This example uses [`createEvents`][create-events] from +[`@sigrea/use`][sigrea-use]. ```ts import { @@ -366,8 +375,10 @@ setScopeCleanupErrorHandler((error, context) => { The handler receives `error` and `context`. `context` includes `scopeId`, `phase`, `index`, and `total`. -Return `ScopeCleanupErrorResponse.Suppress` to prevent the error from being thrown. -Return `ScopeCleanupErrorResponse.Propagate` to rethrow immediately for synchronous errors. +Return `ScopeCleanupErrorResponse.Suppress` to prevent the error from being +thrown. +Return `ScopeCleanupErrorResponse.Propagate` to rethrow immediately for +synchronous errors. ## Development @@ -410,8 +421,12 @@ You can also run pnpm scripts directly: - `pnpm build` builds the package. - `pnpm -s cicheck` runs CI checks locally. -See [CONTRIBUTING.md](./CONTRIBUTING.md) for workflow details. +See [CONTRIBUTING.md](https://github.com/sigrea/core/blob/main/CONTRIBUTING.md) +for workflow details. ## License MIT. See [LICENSE](./LICENSE). + +[create-events]: https://github.com/sigrea/use/tree/main/packages/use/createEvents +[sigrea-use]: https://www.npmjs.com/package/@sigrea/use