A Hook for persisting state into localStorage.
The API is different from ahooks.
const state = useLocalStorageState<T>( key: string, defaultValue?: T | (() => T), ): T