mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 23:02:43 +01:00
all state migrated to zustand, jotai removed
splash page now waits on state hydration from db
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
import { atomWithStorage } from 'jotai/utils'
|
||||
import { getItem, setItem } from '@app/storage/asyncstorage'
|
||||
|
||||
export default <T>(key: string, defaultValue: T) => {
|
||||
return atomWithStorage<T>(key, defaultValue, {
|
||||
getItem: async () => (await getItem(key)) || defaultValue,
|
||||
setItem: setItem,
|
||||
delayInit: true,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user