Skip to content

effect-atom-svelte-devtools@0.4.0

Choose a tag to compare

@github-actions github-actions released this 29 Nov 15:05
· 12 commits to main since this release
83be069

Minor Changes

  • a659d81: Move to Effect 4.1: the effect peer range is now ~4.1.0, so upgrade effect to 4.1 alongside this release. The devtools need effect-atom-svelte 0.5.

    useAtomInitialValues takes the entries Effect 4.1's Atom.initialValue makes, options included, as RegistryProvider's initialValues already does. Give an effect or stream atom Atom.initialValue(atom, value, { skipInitialRun: true }) to keep the value in the browser instead of running the atom again on mount, as for data a load function already fetched. It runs once it is refreshed.

    With Effect 4.1, an effect or stream atom a HydrationBoundary hydrates runs again in the browser once something reads it, as Effect's Hydration.hydrate now does, and shows the server's result until the browser's arrives. On 4.0 only atoms wrapped by Atom.withReactivity and similar did. To keep the server's result, give the atom Atom.serializable({ key, schema, skipInitialRun: true }). The hooks (useAtomResult, useAtomSuspense) still run nothing again unless you set revalidateOnHydrate.

Patch Changes