Skip to content

Commit

Permalink
add custom hooks for recoil user data
Browse files Browse the repository at this point in the history
  • Loading branch information
deveshidwivedi committed Jun 20, 2024
1 parent d3f7f71 commit c9df466
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions common/recoil/users/users.hooks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { useRecoilValue } from "recoil";
import {userIds, usersAtom } from "./users.atoms";

export const useUserIds = () => {
const users= useRecoilValue(userIds);
return users;
};

export const useUsers = () => {
const users = useRecoilValue(usersAtom);
return users;
};

0 comments on commit c9df466

Please sign in to comment.