({ children })
| 4 | import { makeStore } from '../lib/store' |
| 5 | |
| 6 | export default function StoreProvider({ children }) { |
| 7 | const storeRef = useRef(undefined) |
| 8 | if (!storeRef.current) { |
| 9 | // Create the store instance the first time this renders |
| 10 | storeRef.current = makeStore() |
| 11 | } |
| 12 | |
| 13 | return <Provider store={storeRef.current}>{children}</Provider> |
| 14 | } |
nothing calls this directly
no test coverage detected