1 | 'use strict';
|
2 |
|
3 | import React from 'react';
|
4 | function getCurrentReactOwner() {
|
5 | const ReactSharedInternals =
|
6 |
|
7 | React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ||
|
8 |
|
9 | React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
10 | return ReactSharedInternals?.ReactCurrentOwner?.current;
|
11 | }
|
12 | export function isReactRendering() {
|
13 | return !!getCurrentReactOwner();
|
14 | }
|
15 | export function isFirstReactRender() {
|
16 | const currentOwner = getCurrentReactOwner();
|
17 |
|
18 |
|
19 | return currentOwner && !currentOwner?.alternate;
|
20 | }
|
21 |
|
\ | No newline at end of file |