/
githubmr
/
facebook-react
Обзор
Документация
Войти
/
githubmr
/
facebook-react
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
v18.3.0
packages/react-reconciler/src/ReactFiberShellHydration.js
19 строк
635 B
Andrew Clark
Allow updating dehydrated root at lower priority without forcing client render (#24082)
20 мар 2022, 23:18
Не верифицирован
20 мар 2022, 23:18
2e0d86d
Код
Авторство
О чём код?
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ import type {FiberRoot} from './ReactInternalTypes'; import type {RootState} from './ReactFiberRoot.new'; // This is imported by the event replaying implementation in React DOM. It's // in a separate file to break a circular dependency between the renderer and // the reconciler. export function isRootDehydrated(root: FiberRoot) { const currentState: RootState = root.current.memoizedState; return currentState.isDehydrated; }