"use client"; import { useRef } from "react"; import { Provider } from "react-redux"; import { makeStore, AppStore } from "../lib/store"; export default function PeopleProvider({ children, }: { children: React.ReactNode; }) { const storeRef = useRef(undefined); if (!storeRef.current) { // Create the store instance the first time this renders storeRef.current = makeStore(); } return {children}; }