near / react-on-chain

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

Read URL Query Params MVP #428

Closed calebjacob closed 2 weeks ago

calebjacob commented 3 weeks ago

Closes: https://github.com/near/react-on-chain/issues/334

Please check out this comment for more context on the implementation in this PR: https://github.com/near/react-on-chain/issues/334#issuecomment-2070858868

The implementation itself is pretty simple and should be easy to refactor if any of us have concerns down the road. Here's an example component you can check out: https://bos-web-engine-git-feat-read-url-f462bd-near-developer-console.vercel.app/near/RocTest?foobar=abc

I made sure this implementation will support Next's <Link> component (client side routing) if/when we start using that inside our RoC components. The query parameters update and the root component receives the updated props.

Viewing the gateway:

Screen Shot 2024-04-25 at 11 53 26 AM

Viewing the sandbox:

Screen Shot 2024-04-25 at 12 05 41 PM

vercel[bot] commented 3 weeks ago

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

Name Status Preview Updated (UTC)
bos-web-engine ✅ Ready (Inspect) Visit Preview Apr 25, 2024 6:14pm
bos-web-engine-docs ✅ Ready (Inspect) Visit Preview Apr 25, 2024 6:14pm
bos-web-engine-sandbox ✅ Ready (Inspect) Visit Preview Apr 25, 2024 6:14pm