UNPKG

@forrestjs/kitchensink

Version:
9 lines (6 loc) 238 B
import React, { useContext } from 'react'; export const GetContext = React.createContext(); export const useGetContext = (path, defaultValue) => { const getContext = useContext(GetContext); return getContext(path, defaultValue); };