React hook which syncs localStorage[key] with the comp.
Geek Repo:Geek Repo
Github PK Tool:Github PK Tool
pmoskvin opened this issue 5 years ago · comments
if (initialValue !== undefined) writeStorage(key, initialValue);
if (localState === undefined && initialValue !== undefined) writeStorage(key, initialValue);