factory.js 768 B

12345678910111213141516171819
  1. /**
  2. * Copyright (c) 2013-present, Facebook, Inc.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. 'use strict';
  8. // React 15.5 references this module, and assumes PropTypes are still callable in production.
  9. // Therefore we re-export development-only version with all the PropTypes checks here.
  10. // However if one is migrating to the `prop-types` npm library, they will go through the
  11. // `index.js` entry point, and it will branch depending on the environment.
  12. var factory = require('./factoryWithTypeCheckers');
  13. module.exports = function(isValidElement) {
  14. // It is still allowed in 15.5.
  15. var throwOnDirectAccess = false;
  16. return factory(isValidElement, throwOnDirectAccess);
  17. };