client.js 619 B

12345678910111213141516171819202122232425
  1. 'use strict';
  2. var m = require('react-dom');
  3. if (process.env.NODE_ENV === 'production') {
  4. exports.createRoot = m.createRoot;
  5. exports.hydrateRoot = m.hydrateRoot;
  6. } else {
  7. var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
  8. exports.createRoot = function(c, o) {
  9. i.usingClientEntryPoint = true;
  10. try {
  11. return m.createRoot(c, o);
  12. } finally {
  13. i.usingClientEntryPoint = false;
  14. }
  15. };
  16. exports.hydrateRoot = function(c, h, o) {
  17. i.usingClientEntryPoint = true;
  18. try {
  19. return m.hydrateRoot(c, h, o);
  20. } finally {
  21. i.usingClientEntryPoint = false;
  22. }
  23. };
  24. }