"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = getContext;

var _react = require("react");

var contextManager = new Map();

function getContext(key, defaultValue) {
  {
    var _context = contextManager.get(key);

    if (_context) {
      return _context;
    }
  }
  var context = /*#__PURE__*/(0, _react.createContext)(defaultValue);
  contextManager.set(key, context);
  return context;
}
//# sourceMappingURL=index.js.map
