near / react-on-chain

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

Add browser storage #417

Closed pavelisnear closed 3 weeks ago

pavelisnear commented 1 month 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 1 month 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