react-refresh-runtime.development.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. /** @license React vundefined
  2. * react-refresh-runtime.development.js
  3. *
  4. * Copyright (c) Facebook, Inc. and its affiliates.
  5. *
  6. * This source code is licensed under the MIT license found in the
  7. * LICENSE file in the root directory of this source tree.
  8. */
  9. 'use strict';
  10. if (process.env.NODE_ENV !== "production") {
  11. (function() {
  12. 'use strict';
  13. // ATTENTION
  14. // When adding new symbols to this file,
  15. // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
  16. // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
  17. // nor polyfill, then a plain number is used for performance.
  18. var REACT_ELEMENT_TYPE = 0xeac7;
  19. var REACT_PORTAL_TYPE = 0xeaca;
  20. var REACT_FRAGMENT_TYPE = 0xeacb;
  21. var REACT_STRICT_MODE_TYPE = 0xeacc;
  22. var REACT_PROFILER_TYPE = 0xead2;
  23. var REACT_PROVIDER_TYPE = 0xeacd;
  24. var REACT_CONTEXT_TYPE = 0xeace;
  25. var REACT_FORWARD_REF_TYPE = 0xead0;
  26. var REACT_SUSPENSE_TYPE = 0xead1;
  27. var REACT_SUSPENSE_LIST_TYPE = 0xead8;
  28. var REACT_MEMO_TYPE = 0xead3;
  29. var REACT_LAZY_TYPE = 0xead4;
  30. var REACT_SCOPE_TYPE = 0xead7;
  31. var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
  32. var REACT_OFFSCREEN_TYPE = 0xeae2;
  33. var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
  34. var REACT_CACHE_TYPE = 0xeae4;
  35. if (typeof Symbol === 'function' && Symbol.for) {
  36. var symbolFor = Symbol.for;
  37. REACT_ELEMENT_TYPE = symbolFor('react.element');
  38. REACT_PORTAL_TYPE = symbolFor('react.portal');
  39. REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
  40. REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
  41. REACT_PROFILER_TYPE = symbolFor('react.profiler');
  42. REACT_PROVIDER_TYPE = symbolFor('react.provider');
  43. REACT_CONTEXT_TYPE = symbolFor('react.context');
  44. REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
  45. REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
  46. REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
  47. REACT_MEMO_TYPE = symbolFor('react.memo');
  48. REACT_LAZY_TYPE = symbolFor('react.lazy');
  49. REACT_SCOPE_TYPE = symbolFor('react.scope');
  50. REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
  51. REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
  52. REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
  53. REACT_CACHE_TYPE = symbolFor('react.cache');
  54. }
  55. var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; // We never remove these associations.
  56. // It's OK to reference families, but use WeakMap/Set for types.
  57. var allFamiliesByID = new Map();
  58. var allFamiliesByType = new PossiblyWeakMap();
  59. var allSignaturesByType = new PossiblyWeakMap(); // This WeakMap is read by React, so we only put families
  60. // that have actually been edited here. This keeps checks fast.
  61. // $FlowIssue
  62. var updatedFamiliesByType = new PossiblyWeakMap(); // This is cleared on every performReactRefresh() call.
  63. // It is an array of [Family, NextType] tuples.
  64. var pendingUpdates = []; // This is injected by the renderer via DevTools global hook.
  65. var helpersByRendererID = new Map();
  66. var helpersByRoot = new Map(); // We keep track of mounted roots so we can schedule updates.
  67. var mountedRoots = new Set(); // If a root captures an error, we remember it so we can retry on edit.
  68. var failedRoots = new Set(); // In environments that support WeakMap, we also remember the last element for every root.
  69. // It needs to be weak because we do this even for roots that failed to mount.
  70. // If there is no WeakMap, we won't attempt to do retrying.
  71. // $FlowIssue
  72. var rootElements = // $FlowIssue
  73. typeof WeakMap === 'function' ? new WeakMap() : null;
  74. var isPerformingRefresh = false;
  75. function computeFullKey(signature) {
  76. if (signature.fullKey !== null) {
  77. return signature.fullKey;
  78. }
  79. var fullKey = signature.ownKey;
  80. var hooks;
  81. try {
  82. hooks = signature.getCustomHooks();
  83. } catch (err) {
  84. // This can happen in an edge case, e.g. if expression like Foo.useSomething
  85. // depends on Foo which is lazily initialized during rendering.
  86. // In that case just assume we'll have to remount.
  87. signature.forceReset = true;
  88. signature.fullKey = fullKey;
  89. return fullKey;
  90. }
  91. for (var i = 0; i < hooks.length; i++) {
  92. var hook = hooks[i];
  93. if (typeof hook !== 'function') {
  94. // Something's wrong. Assume we need to remount.
  95. signature.forceReset = true;
  96. signature.fullKey = fullKey;
  97. return fullKey;
  98. }
  99. var nestedHookSignature = allSignaturesByType.get(hook);
  100. if (nestedHookSignature === undefined) {
  101. // No signature means Hook wasn't in the source code, e.g. in a library.
  102. // We'll skip it because we can assume it won't change during this session.
  103. continue;
  104. }
  105. var nestedHookKey = computeFullKey(nestedHookSignature);
  106. if (nestedHookSignature.forceReset) {
  107. signature.forceReset = true;
  108. }
  109. fullKey += '\n---\n' + nestedHookKey;
  110. }
  111. signature.fullKey = fullKey;
  112. return fullKey;
  113. }
  114. function haveEqualSignatures(prevType, nextType) {
  115. var prevSignature = allSignaturesByType.get(prevType);
  116. var nextSignature = allSignaturesByType.get(nextType);
  117. if (prevSignature === undefined && nextSignature === undefined) {
  118. return true;
  119. }
  120. if (prevSignature === undefined || nextSignature === undefined) {
  121. return false;
  122. }
  123. if (computeFullKey(prevSignature) !== computeFullKey(nextSignature)) {
  124. return false;
  125. }
  126. if (nextSignature.forceReset) {
  127. return false;
  128. }
  129. return true;
  130. }
  131. function isReactClass(type) {
  132. return type.prototype && type.prototype.isReactComponent;
  133. }
  134. function canPreserveStateBetween(prevType, nextType) {
  135. if (isReactClass(prevType) || isReactClass(nextType)) {
  136. return false;
  137. }
  138. if (haveEqualSignatures(prevType, nextType)) {
  139. return true;
  140. }
  141. return false;
  142. }
  143. function resolveFamily(type) {
  144. // Only check updated types to keep lookups fast.
  145. return updatedFamiliesByType.get(type);
  146. } // If we didn't care about IE11, we could use new Map/Set(iterable).
  147. function cloneMap(map) {
  148. var clone = new Map();
  149. map.forEach(function (value, key) {
  150. clone.set(key, value);
  151. });
  152. return clone;
  153. }
  154. function cloneSet(set) {
  155. var clone = new Set();
  156. set.forEach(function (value) {
  157. clone.add(value);
  158. });
  159. return clone;
  160. } // This is a safety mechanism to protect against rogue getters and Proxies.
  161. function getProperty(object, property) {
  162. try {
  163. return object[property];
  164. } catch (err) {
  165. // Intentionally ignore.
  166. return undefined;
  167. }
  168. }
  169. function performReactRefresh() {
  170. if (pendingUpdates.length === 0) {
  171. return null;
  172. }
  173. if (isPerformingRefresh) {
  174. return null;
  175. }
  176. isPerformingRefresh = true;
  177. try {
  178. var staleFamilies = new Set();
  179. var updatedFamilies = new Set();
  180. var updates = pendingUpdates;
  181. pendingUpdates = [];
  182. updates.forEach(function (_ref) {
  183. var family = _ref[0],
  184. nextType = _ref[1];
  185. // Now that we got a real edit, we can create associations
  186. // that will be read by the React reconciler.
  187. var prevType = family.current;
  188. updatedFamiliesByType.set(prevType, family);
  189. updatedFamiliesByType.set(nextType, family);
  190. family.current = nextType; // Determine whether this should be a re-render or a re-mount.
  191. if (canPreserveStateBetween(prevType, nextType)) {
  192. updatedFamilies.add(family);
  193. } else {
  194. staleFamilies.add(family);
  195. }
  196. }); // TODO: rename these fields to something more meaningful.
  197. var update = {
  198. updatedFamilies: updatedFamilies,
  199. // Families that will re-render preserving state
  200. staleFamilies: staleFamilies // Families that will be remounted
  201. };
  202. helpersByRendererID.forEach(function (helpers) {
  203. // Even if there are no roots, set the handler on first update.
  204. // This ensures that if *new* roots are mounted, they'll use the resolve handler.
  205. helpers.setRefreshHandler(resolveFamily);
  206. });
  207. var didError = false;
  208. var firstError = null; // We snapshot maps and sets that are mutated during commits.
  209. // If we don't do this, there is a risk they will be mutated while
  210. // we iterate over them. For example, trying to recover a failed root
  211. // may cause another root to be added to the failed list -- an infinite loop.
  212. var failedRootsSnapshot = cloneSet(failedRoots);
  213. var mountedRootsSnapshot = cloneSet(mountedRoots);
  214. var helpersByRootSnapshot = cloneMap(helpersByRoot);
  215. failedRootsSnapshot.forEach(function (root) {
  216. var helpers = helpersByRootSnapshot.get(root);
  217. if (helpers === undefined) {
  218. throw new Error('Could not find helpers for a root. This is a bug in React Refresh.');
  219. }
  220. if (!failedRoots.has(root)) {// No longer failed.
  221. }
  222. if (rootElements === null) {
  223. return;
  224. }
  225. if (!rootElements.has(root)) {
  226. return;
  227. }
  228. var element = rootElements.get(root);
  229. try {
  230. helpers.scheduleRoot(root, element);
  231. } catch (err) {
  232. if (!didError) {
  233. didError = true;
  234. firstError = err;
  235. } // Keep trying other roots.
  236. }
  237. });
  238. mountedRootsSnapshot.forEach(function (root) {
  239. var helpers = helpersByRootSnapshot.get(root);
  240. if (helpers === undefined) {
  241. throw new Error('Could not find helpers for a root. This is a bug in React Refresh.');
  242. }
  243. if (!mountedRoots.has(root)) {// No longer mounted.
  244. }
  245. try {
  246. helpers.scheduleRefresh(root, update);
  247. } catch (err) {
  248. if (!didError) {
  249. didError = true;
  250. firstError = err;
  251. } // Keep trying other roots.
  252. }
  253. });
  254. if (didError) {
  255. throw firstError;
  256. }
  257. return update;
  258. } finally {
  259. isPerformingRefresh = false;
  260. }
  261. }
  262. function register(type, id) {
  263. {
  264. if (type === null) {
  265. return;
  266. }
  267. if (typeof type !== 'function' && typeof type !== 'object') {
  268. return;
  269. } // This can happen in an edge case, e.g. if we register
  270. // return value of a HOC but it returns a cached component.
  271. // Ignore anything but the first registration for each type.
  272. if (allFamiliesByType.has(type)) {
  273. return;
  274. } // Create family or remember to update it.
  275. // None of this bookkeeping affects reconciliation
  276. // until the first performReactRefresh() call above.
  277. var family = allFamiliesByID.get(id);
  278. if (family === undefined) {
  279. family = {
  280. current: type
  281. };
  282. allFamiliesByID.set(id, family);
  283. } else {
  284. pendingUpdates.push([family, type]);
  285. }
  286. allFamiliesByType.set(type, family); // Visit inner types because we might not have registered them.
  287. if (typeof type === 'object' && type !== null) {
  288. switch (getProperty(type, '$$typeof')) {
  289. case REACT_FORWARD_REF_TYPE:
  290. register(type.render, id + '$render');
  291. break;
  292. case REACT_MEMO_TYPE:
  293. register(type.type, id + '$type');
  294. break;
  295. }
  296. }
  297. }
  298. }
  299. function setSignature(type, key) {
  300. var forceReset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  301. var getCustomHooks = arguments.length > 3 ? arguments[3] : undefined;
  302. {
  303. if (!allSignaturesByType.has(type)) {
  304. allSignaturesByType.set(type, {
  305. forceReset: forceReset,
  306. ownKey: key,
  307. fullKey: null,
  308. getCustomHooks: getCustomHooks || function () {
  309. return [];
  310. }
  311. });
  312. } // Visit inner types because we might not have signed them.
  313. if (typeof type === 'object' && type !== null) {
  314. switch (getProperty(type, '$$typeof')) {
  315. case REACT_FORWARD_REF_TYPE:
  316. setSignature(type.render, key, forceReset, getCustomHooks);
  317. break;
  318. case REACT_MEMO_TYPE:
  319. setSignature(type.type, key, forceReset, getCustomHooks);
  320. break;
  321. }
  322. }
  323. }
  324. } // This is lazily called during first render for a type.
  325. // It captures Hook list at that time so inline requires don't break comparisons.
  326. function collectCustomHooksForSignature(type) {
  327. {
  328. var signature = allSignaturesByType.get(type);
  329. if (signature !== undefined) {
  330. computeFullKey(signature);
  331. }
  332. }
  333. }
  334. function getFamilyByID(id) {
  335. {
  336. return allFamiliesByID.get(id);
  337. }
  338. }
  339. function getFamilyByType(type) {
  340. {
  341. return allFamiliesByType.get(type);
  342. }
  343. }
  344. function findAffectedHostInstances(families) {
  345. {
  346. var affectedInstances = new Set();
  347. mountedRoots.forEach(function (root) {
  348. var helpers = helpersByRoot.get(root);
  349. if (helpers === undefined) {
  350. throw new Error('Could not find helpers for a root. This is a bug in React Refresh.');
  351. }
  352. var instancesForRoot = helpers.findHostInstancesForRefresh(root, families);
  353. instancesForRoot.forEach(function (inst) {
  354. affectedInstances.add(inst);
  355. });
  356. });
  357. return affectedInstances;
  358. }
  359. }
  360. function injectIntoGlobalHook(globalObject) {
  361. {
  362. // For React Native, the global hook will be set up by require('react-devtools-core').
  363. // That code will run before us. So we need to monkeypatch functions on existing hook.
  364. // For React Web, the global hook will be set up by the extension.
  365. // This will also run before us.
  366. var hook = globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__;
  367. if (hook === undefined) {
  368. // However, if there is no DevTools extension, we'll need to set up the global hook ourselves.
  369. // Note that in this case it's important that renderer code runs *after* this method call.
  370. // Otherwise, the renderer will think that there is no global hook, and won't do the injection.
  371. var nextID = 0;
  372. globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__ = hook = {
  373. renderers: new Map(),
  374. supportsFiber: true,
  375. inject: function (injected) {
  376. return nextID++;
  377. },
  378. onScheduleFiberRoot: function (id, root, children) {},
  379. onCommitFiberRoot: function (id, root, maybePriorityLevel, didError) {},
  380. onCommitFiberUnmount: function () {}
  381. };
  382. }
  383. if (hook.isDisabled) {
  384. // This isn't a real property on the hook, but it can be set to opt out
  385. // of DevTools integration and associated warnings and logs.
  386. // Using console['warn'] to evade Babel and ESLint
  387. console['warn']('Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). ' + 'Fast Refresh is not compatible with this shim and will be disabled.');
  388. return;
  389. } // Here, we just want to get a reference to scheduleRefresh.
  390. var oldInject = hook.inject;
  391. hook.inject = function (injected) {
  392. var id = oldInject.apply(this, arguments);
  393. if (typeof injected.scheduleRefresh === 'function' && typeof injected.setRefreshHandler === 'function') {
  394. // This version supports React Refresh.
  395. helpersByRendererID.set(id, injected);
  396. }
  397. return id;
  398. }; // Do the same for any already injected roots.
  399. // This is useful if ReactDOM has already been initialized.
  400. // https://github.com/facebook/react/issues/17626
  401. hook.renderers.forEach(function (injected, id) {
  402. if (typeof injected.scheduleRefresh === 'function' && typeof injected.setRefreshHandler === 'function') {
  403. // This version supports React Refresh.
  404. helpersByRendererID.set(id, injected);
  405. }
  406. }); // We also want to track currently mounted roots.
  407. var oldOnCommitFiberRoot = hook.onCommitFiberRoot;
  408. var oldOnScheduleFiberRoot = hook.onScheduleFiberRoot || function () {};
  409. hook.onScheduleFiberRoot = function (id, root, children) {
  410. if (!isPerformingRefresh) {
  411. // If it was intentionally scheduled, don't attempt to restore.
  412. // This includes intentionally scheduled unmounts.
  413. failedRoots.delete(root);
  414. if (rootElements !== null) {
  415. rootElements.set(root, children);
  416. }
  417. }
  418. return oldOnScheduleFiberRoot.apply(this, arguments);
  419. };
  420. hook.onCommitFiberRoot = function (id, root, maybePriorityLevel, didError) {
  421. var helpers = helpersByRendererID.get(id);
  422. if (helpers !== undefined) {
  423. helpersByRoot.set(root, helpers);
  424. var current = root.current;
  425. var alternate = current.alternate; // We need to determine whether this root has just (un)mounted.
  426. // This logic is copy-pasted from similar logic in the DevTools backend.
  427. // If this breaks with some refactoring, you'll want to update DevTools too.
  428. if (alternate !== null) {
  429. var wasMounted = alternate.memoizedState != null && alternate.memoizedState.element != null;
  430. var isMounted = current.memoizedState != null && current.memoizedState.element != null;
  431. if (!wasMounted && isMounted) {
  432. // Mount a new root.
  433. mountedRoots.add(root);
  434. failedRoots.delete(root);
  435. } else if (wasMounted && isMounted) ; else if (wasMounted && !isMounted) {
  436. // Unmount an existing root.
  437. mountedRoots.delete(root);
  438. if (didError) {
  439. // We'll remount it on future edits.
  440. failedRoots.add(root);
  441. } else {
  442. helpersByRoot.delete(root);
  443. }
  444. } else if (!wasMounted && !isMounted) {
  445. if (didError) {
  446. // We'll remount it on future edits.
  447. failedRoots.add(root);
  448. }
  449. }
  450. } else {
  451. // Mount a new root.
  452. mountedRoots.add(root);
  453. }
  454. } // Always call the decorated DevTools hook.
  455. return oldOnCommitFiberRoot.apply(this, arguments);
  456. };
  457. }
  458. }
  459. function hasUnrecoverableErrors() {
  460. // TODO: delete this after removing dependency in RN.
  461. return false;
  462. } // Exposed for testing.
  463. function _getMountedRootCount() {
  464. {
  465. return mountedRoots.size;
  466. }
  467. } // This is a wrapper over more primitive functions for setting signature.
  468. // Signatures let us decide whether the Hook order has changed on refresh.
  469. //
  470. // This function is intended to be used as a transform target, e.g.:
  471. // var _s = createSignatureFunctionForTransform()
  472. //
  473. // function Hello() {
  474. // const [foo, setFoo] = useState(0);
  475. // const value = useCustomHook();
  476. // _s(); /* Call without arguments triggers collecting the custom Hook list.
  477. // * This doesn't happen during the module evaluation because we
  478. // * don't want to change the module order with inline requires.
  479. // * Next calls are noops. */
  480. // return <h1>Hi</h1>;
  481. // }
  482. //
  483. // /* Call with arguments attaches the signature to the type: */
  484. // _s(
  485. // Hello,
  486. // 'useState{[foo, setFoo]}(0)',
  487. // () => [useCustomHook], /* Lazy to avoid triggering inline requires */
  488. // );
  489. function createSignatureFunctionForTransform() {
  490. {
  491. var savedType;
  492. var hasCustomHooks;
  493. var didCollectHooks = false;
  494. return function (type, key, forceReset, getCustomHooks) {
  495. if (typeof key === 'string') {
  496. // We're in the initial phase that associates signatures
  497. // with the functions. Note this may be called multiple times
  498. // in HOC chains like _s(hoc1(_s(hoc2(_s(actualFunction))))).
  499. if (!savedType) {
  500. // We're in the innermost call, so this is the actual type.
  501. savedType = type;
  502. hasCustomHooks = typeof getCustomHooks === 'function';
  503. } // Set the signature for all types (even wrappers!) in case
  504. // they have no signatures of their own. This is to prevent
  505. // problems like https://github.com/facebook/react/issues/20417.
  506. if (type != null && (typeof type === 'function' || typeof type === 'object')) {
  507. setSignature(type, key, forceReset, getCustomHooks);
  508. }
  509. return type;
  510. } else {
  511. // We're in the _s() call without arguments, which means
  512. // this is the time to collect custom Hook signatures.
  513. // Only do this once. This path is hot and runs *inside* every render!
  514. if (!didCollectHooks && hasCustomHooks) {
  515. didCollectHooks = true;
  516. collectCustomHooksForSignature(savedType);
  517. }
  518. }
  519. };
  520. }
  521. }
  522. function isLikelyComponentType(type) {
  523. {
  524. switch (typeof type) {
  525. case 'function':
  526. {
  527. // First, deal with classes.
  528. if (type.prototype != null) {
  529. if (type.prototype.isReactComponent) {
  530. // React class.
  531. return true;
  532. }
  533. var ownNames = Object.getOwnPropertyNames(type.prototype);
  534. if (ownNames.length > 1 || ownNames[0] !== 'constructor') {
  535. // This looks like a class.
  536. return false;
  537. } // eslint-disable-next-line no-proto
  538. if (type.prototype.__proto__ !== Object.prototype) {
  539. // It has a superclass.
  540. return false;
  541. } // Pass through.
  542. // This looks like a regular function with empty prototype.
  543. } // For plain functions and arrows, use name as a heuristic.
  544. var name = type.name || type.displayName;
  545. return typeof name === 'string' && /^[A-Z]/.test(name);
  546. }
  547. case 'object':
  548. {
  549. if (type != null) {
  550. switch (getProperty(type, '$$typeof')) {
  551. case REACT_FORWARD_REF_TYPE:
  552. case REACT_MEMO_TYPE:
  553. // Definitely React components.
  554. return true;
  555. default:
  556. return false;
  557. }
  558. }
  559. return false;
  560. }
  561. default:
  562. {
  563. return false;
  564. }
  565. }
  566. }
  567. }
  568. exports._getMountedRootCount = _getMountedRootCount;
  569. exports.collectCustomHooksForSignature = collectCustomHooksForSignature;
  570. exports.createSignatureFunctionForTransform = createSignatureFunctionForTransform;
  571. exports.findAffectedHostInstances = findAffectedHostInstances;
  572. exports.getFamilyByID = getFamilyByID;
  573. exports.getFamilyByType = getFamilyByType;
  574. exports.hasUnrecoverableErrors = hasUnrecoverableErrors;
  575. exports.injectIntoGlobalHook = injectIntoGlobalHook;
  576. exports.isLikelyComponentType = isLikelyComponentType;
  577. exports.performReactRefresh = performReactRefresh;
  578. exports.register = register;
  579. exports.setSignature = setSignature;
  580. })();
  581. }