@solid-primitives/utils
Advanced tools
Comparing version 5.2.0 to 5.2.1
@@ -196,3 +196,3 @@ import { Accessor, Setter, AccessorArray, NoInfer, EffectFunction, onCleanup, SignalOptions, Signal } from 'solid-js'; | ||
* @param serverValue initial value of the state on the server | ||
* @param update called once on the client or on hydration to initialise the value | ||
* @param update called once on the client or on hydration to initialize the value | ||
* @param options {@link SignalOptions} | ||
@@ -199,0 +199,0 @@ * @returns |
@@ -30,3 +30,3 @@ import { DEV, untrack, getOwner, onCleanup, createSignal, sharedConfig, onMount, batch } from 'solid-js'; | ||
const _value = access(value); | ||
typeof _value !== "undefined" && _value !== null && fn(_value); | ||
typeof _value != null && fn(_value); | ||
}; | ||
@@ -159,5 +159,4 @@ var asAccessor = (v) => typeof v === "function" ? v : () => v; | ||
} | ||
let init = !!sharedConfig.context; | ||
const [state, setState] = createSignal(init ? serverValue : update(), options); | ||
init && onMount(() => setState(() => update())); | ||
const [state, setState] = createSignal(sharedConfig.context ? serverValue : update(), options); | ||
sharedConfig.context && onMount(() => setState(() => update())); | ||
return [state, setState]; | ||
@@ -164,0 +163,0 @@ } |
{ | ||
"name": "@solid-primitives/utils", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"description": "A bunch of reactive utility types and functions, for building primitives with Solid.js", | ||
@@ -5,0 +5,0 @@ "author": "Damian Tarnawski @thetarnav <gthetarnav@gmail.com>", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22207
536