diff --git a/plugins/store/README.md b/plugins/store/README.md index 474f138b..b94a2284 100644 --- a/plugins/store/README.md +++ b/plugins/store/README.md @@ -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. diff --git a/plugins/store/examples/AppSettingsManager/src-tauri/src/main.rs b/plugins/store/examples/AppSettingsManager/src-tauri/src/main.rs index 95da5bee..fbe250ae 100644 --- a/plugins/store/examples/AppSettingsManager/src-tauri/src/main.rs +++ b/plugins/store/examples/AppSettingsManager/src-tauri/src/main.rs @@ -17,7 +17,7 @@ fn main() { .plugin(tauri_plugin_store::Builder::new().build()) .setup(|app| { // Init store and load it from disk - let store = app.handle().store_builder("settings.json").build().unwrap(); + let store = app.store("settings.json"); app.listen("store://change", |event| { dbg!(event); });