Any data persistence library recommendation? #883
Answered
by
cawa-93
anothertempore
asked this question in
Q&A
-
I've checked these:
Seems like 1 and 2 have bad support for Any recommendations from you guys? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Answered by
cawa-93
Dec 24, 2022
Replies: 2 comments 1 reply
-
https://github.com/cawa-93/electron-nano-store — A minimalistic, secure, type-safe data store for Electron Usage// In Electron Preload Script
import {defineStore} from 'electron-nano-store';
type UserStore = {
role: 'admin' | 'user'
}
export const storePromise = defineStore<UserStore>('store-name'); // In Renderer
import { storePromise } from '#preload';
const store = await storePromise
store.get('role') // 'admin' | 'user'
store.set('role', 'wrong-role') // TS Error |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
cawa-93
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/cawa-93/electron-nano-store — A minimalistic, secure, type-safe data store for Electron
Usage