near / bos-web-engine

Improved execution layer for NEAR decentralized frontend components
https://roc-docs.near.dev/
26 stars 6 forks source link

Add browser storage #417

Closed pavelisnear closed 7 months ago

pavelisnear commented 7 months ago

This PR introduces a container storage plugin, which allows to access the browser local storage under the component namespace, where the componentId is used to prefix the final local storage key.

import ContainerStoragePlugin from '@bos-web-engine/container-storage-plugin';
...
const value = await ContainerStoragePlugin.getItem('exampleKey')
image

Fixes https://github.com/near/bos-web-engine/issues/27

vercel[bot] commented 7 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bos-web-engine ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 6:31pm
bos-web-engine-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 6:31pm
bos-web-engine-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 6:31pm