mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-08-19 19:17:15 +02:00
Use store instead of store_builder in example
This commit is contained in:
@@ -70,7 +70,7 @@ Afterwards all the plugin's APIs are available through the JavaScript guest bind
|
||||
```typescript
|
||||
import { LazyStore } from '@tauri-apps/plugin-store'
|
||||
|
||||
const store = new LazyStore('.settings.dat')
|
||||
const store = new LazyStore('settings.json')
|
||||
|
||||
await store.set('some-key', { value: 5 })
|
||||
|
||||
@@ -113,7 +113,7 @@ fn main() {
|
||||
.plugin(tauri_plugin_store::Builder::default().build())
|
||||
.setup(|app| {
|
||||
// This loads the store from disk
|
||||
let store = app.store_builder("app_data.bin").build()?;
|
||||
let store = app.store("app_data.json");
|
||||
|
||||
// Note that values must be serde_json::Value instances,
|
||||
// otherwise, they will not be compatible with the JavaScript bindings.
|
||||
|
||||
Reference in New Issue
Block a user