near / react-on-chain

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

Add persistent component cache #387

Closed pavelisnear closed 1 month ago

pavelisnear commented 1 month ago

This PR is built on top of the previously reverted https://github.com/near/bos-web-engine/pull/288

Introduces a a persistent component cache:

image

Test example component (compatibility with the block height feature)

import BlockHeightWithFlagTest from 'near://pavel-pagoda.near/BlockHeightWithFlagTest@115592558';
import BlockHeightWithFlagTestLatest from 'near://pavel-pagoda.near/BlockHeightWithFlagTest';

export default function () {
  return (
    <div>
      <h1>Sandbox with a block height:</h1>
      <BlockHeightWithFlagTest />
      <hr />
      <h1>Sandbox latest:</h1>
      <BlockHeightWithFlagTestLatest />
    </div>
  );
}

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

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 3, 2024 8:11am
bos-web-engine-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2024 8:11am
bos-web-engine-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2024 8:11am