Skip to content

Commit

Permalink
change useSetAtom to useAtom[1]
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaskasky committed Oct 27, 2023
1 parent d34eb01 commit 2c9c906
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion __tests__/atomEffect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ describe.only('should not run the effect when the effectAtom is unmounted', () =
})
function useTest() {
useAtom(effectAtom)
return useSetAtom(countAtom)
return useAtom(countAtom)[1]
}
const { result } = renderHook(useTest)
const setCount = result.current
Expand Down

0 comments on commit 2c9c906

Please sign in to comment.