UNPKG

@happykit/flags

Version:

Feature Flags for Next.js

2 lines (1 loc) 329 B
import*as e from"react";var r=e.createContext(null);function l(){return function(){let t=e.useContext(r);if(t===null)throw new Error("Error: useFlagBag was used outside of FlagBagProvider.");return t}}function g(a){return e.createElement(r.Provider,{value:a.value},a.children)}export{g as FlagBagProvider,l as createUseFlagBag};