diff --git a/packages/app/package.json b/packages/app/package.json index df21ae4..ce2e580 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -52,7 +52,7 @@ "solid-js": "^1.9.3", "solid-jsx": "^1.1.4", "solid-mdx": "^0.0.7", - "statebuilder": "^0.7.2", + "statebuilder": "^0.7.3", "unique-names-generator": "^4.7.1", "vinxi": "^0.4.3", "vscode-languageserver-protocol": "^3.17.5", diff --git a/packages/app/src/lib/statebuilder/async.ts b/packages/app/src/lib/statebuilder/async.ts index 56d4a31..ef3039e 100644 --- a/packages/app/src/lib/statebuilder/async.ts +++ b/packages/app/src/lib/statebuilder/async.ts @@ -1,5 +1,5 @@ import {AccessorWithLatest, createAsync} from '@solidjs/router'; -import {createEffect, createSignal, on, Setter} from 'solid-js'; +import {createComputed, createSignal, on, Setter} from 'solid-js'; import {create} from 'statebuilder'; export interface AsyncSignalState { @@ -32,7 +32,7 @@ function makeAsyncSignal( options?.initialValue, ); - createEffect( + createComputed( on(asyncState, latest => { // Sync latest signal retrieved by asyncState in order to be available globally after navigation setSignal(() => latest); @@ -51,5 +51,6 @@ function makeAsyncSignal( * Define an async signal. * * @experimental TODO port to statebuilder? + * */ export const eDefineAsync = create('asyncSignal', makeAsyncSignal); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e341018..77298fb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -161,8 +161,8 @@ importers: specifier: ^0.0.7 version: 0.0.7(patch_hash=wongdwyww6mzxros5anf6ruhb4)(solid-js@1.9.3)(vite@5.4.10(@types/node@22.8.5)(terser@5.34.1)) statebuilder: - specifier: ^0.7.2 - version: 0.7.2 + specifier: ^0.7.3 + version: 0.7.3 unique-names-generator: specifier: ^4.7.1 version: 4.7.1 @@ -5442,8 +5442,8 @@ packages: statebuilder@0.6.2: resolution: {integrity: sha512-GLq0GKh/++3tQ3R9VsQ488Ma+KANSxWwGtVsqKlgX7VNfx3zS1CRrPCpfnbZBdNUQFOgiEFHt9TfNldPs93miw==} - statebuilder@0.7.2: - resolution: {integrity: sha512-bQG6qfZlQ6xFio+6wccpjpDQWPxk4WCRyzRteCDltGgxb+DqCP7vk55pkfvBDseazplF0oGztgtDN/l8BySZsQ==} + statebuilder@0.7.3: + resolution: {integrity: sha512-K9D+pkE/PxFZu70V3Mc+/ebXb+gRIZrStewKf4R69TUTZNsj4VOXpMfCwrRjogkbGc4KQ+Ne8CzbHC0BgB8j1g==} statuses@2.0.1: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} @@ -12383,7 +12383,7 @@ snapshots: rxjs: 7.8.1 solid-js: 1.9.3 - statebuilder@0.7.2: + statebuilder@0.7.3: dependencies: '@babel/parser': 7.26.2 '@solid-primitives/event-bus': 1.0.11(solid-js@1.9.3)