mirror of
https://github.com/balzack/databag.git
synced 2025-02-13 03:59:16 +00:00
15 lines
367 B
JavaScript
15 lines
367 B
JavaScript
import { createContext } from 'react';
|
|
import { useStoreContext } from './useStoreContext.hook';
|
|
|
|
export const StoreContext = createContext({});
|
|
|
|
export function StoreContextProvider({ children }) {
|
|
const { state, actions } = useStoreContext();
|
|
return (
|
|
<StoreContext.Provider value={{ state, actions }}>
|
|
{children}
|
|
</StoreContext.Provider>
|
|
);
|
|
}
|
|
|