databag/net/web/src/context/ChannelContext.js
2022-04-25 22:25:03 -07:00

15 lines
381 B
JavaScript

import { createContext } from 'react';
import { useChannelContext } from './useChannelContext.hook';
export const ChannelContext = createContext({});
export function ChannelContextProvider({ children }) {
const { state, actions } = useChannelContext();
return (
<ChannelContext.Provider value={{ state, actions }}>
{children}
</ChannelContext.Provider>
);
}