VocRT / frontend /src /hooks /FetchData.tsx
Anurag
version-2 initial version
5306da4
import { useAppDispatch } from "@/redux/hooks";
import { getChats } from "@/redux/slices/chatsSlice";
import { useEffect } from "react";
const FetchData = () => {
const dispatch = useAppDispatch();
useEffect(() => {
dispatch(getChats());
}, []);
return null;
};
export default FetchData;