Create a new store with the given id and initial state.
id
state
import { store } from '@tauri-store/valtio';export const foo = store('foo', { counter: 0 });// "state" is the actual valtio proxy.export const increment = () => { foo.state.counter++;}; Copy
import { store } from '@tauri-store/valtio';export const foo = store('foo', { counter: 0 });// "state" is the actual valtio proxy.export const increment = () => { foo.state.counter++;};
Create a new store with the given
id
and initialstate
.