From efde5e9950d548074e9ae8e842438771c03ff89a Mon Sep 17 00:00:00 2001 From: hattyhattington17 <> Date: Thu, 17 Oct 2024 14:02:50 -0600 Subject: [PATCH 1/3] add server component cache disclaimer to tutorial 4 --- docs/zkapps/tutorials/04-zkapp-ui-with-react.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/zkapps/tutorials/04-zkapp-ui-with-react.mdx b/docs/zkapps/tutorials/04-zkapp-ui-with-react.mdx index 59aadbe97..e7eb568ac 100644 --- a/docs/zkapps/tutorials/04-zkapp-ui-with-react.mdx +++ b/docs/zkapps/tutorials/04-zkapp-ui-with-react.mdx @@ -332,6 +332,12 @@ async setActiveInstanceToDevnet() { Depending on the network you are going to work with you might want to consider changing the GraphQL endpoint in the `setActiveInstanceToDevnet` function. Mind the supported networks by `Auro Wallet` though. +:::info + +In this example, the `o1js` code is included in a client component and executed on the client side using an effect after the page loads. If you're integrating `o1js` within a server component, be aware that Next.js's caching mechanism might cause `o1js` to return outdated data. To prevent this, you can disable caching by adding `export const revalidate = 0;` to your component. For more details, refer to the [Next.js caching documentation](https://nextjs.org/docs/app/building-your-application/caching#opting-out-2). + +::: + ### Add state These `04-zkapp-browser-ui/ui/app/page.tsx` statements creates mutable state that you can reference in the UI. The state updates as the application runs: From ce8a73a7a933eb7e379e2f44a68c41f832859264 Mon Sep 17 00:00:00 2001 From: hattyhattington17 <> Date: Sat, 19 Oct 2024 16:11:40 +0300 Subject: [PATCH 2/3] allow manual trigger of algolia workflow --- .github/workflows/algolia-search.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/algolia-search.yml b/.github/workflows/algolia-search.yml index 350162f2b..875c060e8 100644 --- a/.github/workflows/algolia-search.yml +++ b/.github/workflows/algolia-search.yml @@ -5,10 +5,13 @@ # name: Algolia-Search + on: push: branches: - main + workflow_dispatch: + jobs: wait-for-vercel: runs-on: ubuntu-latest From 9ab5d414b3367a82ad544fa7b8e2eb05f70867b8 Mon Sep 17 00:00:00 2001 From: hattyhattington17 <181872047+hattyhattington17@users.noreply.github.com> Date: Mon, 25 Nov 2024 01:51:00 +0800 Subject: [PATCH 3/3] fix broken link to offchain storage example --- .../writing-a-zkapp/feature-overview/offchain-storage.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zkapps/writing-a-zkapp/feature-overview/offchain-storage.mdx b/docs/zkapps/writing-a-zkapp/feature-overview/offchain-storage.mdx index f046e1a9a..cbab50ae7 100644 --- a/docs/zkapps/writing-a-zkapp/feature-overview/offchain-storage.mdx +++ b/docs/zkapps/writing-a-zkapp/feature-overview/offchain-storage.mdx @@ -185,4 +185,4 @@ This feature remains experimental, indicating that it is currently under active - [Experimental Offchain Storage part 1](https://github.com/o1-labs/o1js/pull/1630) - [Experimental Offchain Storage part 2](https://github.com/o1-labs/o1js/pull/1652) -- [An end-to-end example utilizing Offchain storage](https://github.com/o1-labs/o1js/blob/main/src/lib/mina/actions/offchain-contract.unit-test.ts) +- [An end-to-end example utilizing Offchain storage](https://github.com/o1-labs/o1js/blob/main/src/lib/mina/actions/offchain-contract-tests/ExampleContract.ts)