Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Dec 9, 2024
1 parent efd57ea commit f2e4925
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/content/runtime/concepts/save-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,23 @@ console.log(`App last opened: ${lastOpenedString}`);
localStorage.lastOpened = Date.now();
```

### Disabling localStorage

If your application does not need to persist save data, then you can disable the `localStorage`
API by setting the `nacp.userAccountSaveDataSize` property in `package.json` to `0`:

```json title="package.json"
{
"nacp": {
"userAccountSaveDataSize": "0"
}
}
```

When this value is set, accessing `localStorage` will return `undefined`.
This prevents the profile selector from being shown, if any 3rd party modules
attempt to access `localStorage`.

## Accessing save data for other applications

The low-level save data interface allows mounting the save data filesystem for any installed application and for the various types of save data filesystems (account, cache, bcat, etc.).
Expand Down

0 comments on commit f2e4925

Please sign in to comment.