mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
Fixing Plugin API doc on persistence
This commit is contained in:
parent
32b6e22fe8
commit
3bc5bb28cd
1 changed files with 3 additions and 3 deletions
|
|
@ -445,11 +445,11 @@ You can persist data that will also be synced vai the `persistDataSynced` and `l
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// Save plugin data
|
// Save plugin data
|
||||||
await PluginAPI.persistDataSynced('myKey', { count: 42 });
|
await PluginAPI.persistDataSynced(JSON.stringify({ count: 42 }));
|
||||||
|
|
||||||
// Load saved data
|
// Load saved data
|
||||||
const data = await PluginAPI.loadSyncedData('myKey');
|
const data = await PluginAPI.loadSyncedData();
|
||||||
console.log(data); // { count: 42 }
|
console.log(data); // '{ count: 42 }'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Best Practices
|
## Best Practices
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue