Fixing Plugin API doc on persistence

This commit is contained in:
Florian Bachmann 2026-01-05 08:03:07 +01:00 committed by GitHub
parent 32b6e22fe8
commit 3bc5bb28cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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