From 5023e7fb7e00b88154bc7c188ca56c55ccdad0d1 Mon Sep 17 00:00:00 2001 From: Vasu Singh Date: Fri, 17 Feb 2023 13:49:56 +0530 Subject: [PATCH] Fixing nextjs-recoil example (#46024) --- examples/with-recoil/lib/recoil-atoms.js | 2 ++ examples/with-recoil/package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/with-recoil/lib/recoil-atoms.js b/examples/with-recoil/lib/recoil-atoms.js index 1b0f36cdd2212..3adcc32f66fef 100644 --- a/examples/with-recoil/lib/recoil-atoms.js +++ b/examples/with-recoil/lib/recoil-atoms.js @@ -7,10 +7,12 @@ export const countState = atom({ export const incrementCount = selector({ key: 'incrementCount', + get: ({ get }) => get(countState), set: ({ set }) => set(countState, (currCount) => currCount + 1), }) export const decrementCount = selector({ key: 'decrementCount', + get: ({ get }) => get(countState), set: ({ set }) => set(countState, (currCount) => currCount - 1), }) diff --git a/examples/with-recoil/package.json b/examples/with-recoil/package.json index 8bf07fde75023..1f6a55ac55acd 100644 --- a/examples/with-recoil/package.json +++ b/examples/with-recoil/package.json @@ -9,6 +9,6 @@ "next": "latest", "react": "^18.2.0", "react-dom": "^18.2.0", - "recoil": "0.0.7" + "recoil": "0.7.6" } }