Skip to main content

Similar to useState intial state.


Otherwise, there will always be boilerplate code of if value is null then value is initial value:


let [value, setValue, canSetValue] = useSynced('myGlobalConfigKey');
if (value == null) {
value = 'initialValue';
}

Cheers,

Ronen Babayoff

Superblocks.at

Be the first to reply!

Reply