UNPKG

storybook-addon-performance

Version:

A storybook addon to help better understand and debug performance for React components

16 lines (13 loc) 302 B
import { invariant } from "./chunk-WOOEBIFK.mjs"; // src/use-required-context.ts import { useContext } from "react"; function useRequiredContext(Context2) { const value = useContext(Context2); invariant(value, "Could not find context value"); return value; } export { useRequiredContext };