createNameContext.js 287 B

1234567891011
  1. // TODO: Replace with React.createContext once we can assume React 16+
  2. import createContext from "mini-create-react-context";
  3. const createNamedContext = name => {
  4. const context = createContext();
  5. context.displayName = name;
  6. return context;
  7. };
  8. export default createNamedContext;