Skip to content

Commit

Permalink
Fixing nextjs-recoil example (#46024)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasucp1207 authored Feb 17, 2023
1 parent 8163284 commit 5023e7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions examples/with-recoil/lib/recoil-atoms.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
})
2 changes: 1 addition & 1 deletion examples/with-recoil/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"next": "latest",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"recoil": "0.0.7"
"recoil": "0.7.6"
}
}

0 comments on commit 5023e7f

Please sign in to comment.