Repository navigation
effect-atom-svelte-devtools@0.4.0
Minor Changes
-
a659d81: Move to Effect 4.1: the
effectpeer range is now~4.1.0, so upgradeeffectto 4.1 alongside this release. The devtools needeffect-atom-svelte0.5.useAtomInitialValuestakes the entries Effect 4.1'sAtom.initialValuemakes, options included, asRegistryProvider'sinitialValuesalready does. Give an effect or stream atomAtom.initialValue(atom, value, { skipInitialRun: true })to keep the value in the browser instead of running the atom again on mount, as for data aloadfunction already fetched. It runs once it is refreshed.With Effect 4.1, an effect or stream atom a
HydrationBoundaryhydrates runs again in the browser once something reads it, as Effect'sHydration.hydratenow does, and shows the server's result until the browser's arrives. On 4.0 only atoms wrapped byAtom.withReactivityand similar did. To keep the server's result, give the atomAtom.serializable({ key, schema, skipInitialRun: true }). The hooks (useAtomResult,useAtomSuspense) still run nothing again unless you setrevalidateOnHydrate.