From c9df4668e73d61f572cd8a0106fe1c049bc597a9 Mon Sep 17 00:00:00 2001 From: Deveshi Dwivedi Date: Thu, 20 Jun 2024 18:09:43 +0530 Subject: [PATCH] add custom hooks for recoil user data --- common/recoil/users/users.hooks.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 common/recoil/users/users.hooks.ts diff --git a/common/recoil/users/users.hooks.ts b/common/recoil/users/users.hooks.ts new file mode 100644 index 0000000..3c963ed --- /dev/null +++ b/common/recoil/users/users.hooks.ts @@ -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; +}; \ No newline at end of file