/
githubmr
/
facebook-react
Обзор
Документация
Войти
/
githubmr
/
facebook-react
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
v16.14.0
packages/react/src/ReactStartTransition.js
20 строк
522 B
Andrew Clark
Replace SuspenseConfig object with an integer (#19706)
28 авг 2020, 20:52
Не верифицирован
28 авг 2020, 20:52
92fcd46
Код
Авторство
О чём код?
/** * 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 ReactCurrentBatchConfig from './ReactCurrentBatchConfig'; export function startTransition(scope: () => void) { const prevTransition = ReactCurrentBatchConfig.transition; ReactCurrentBatchConfig.transition = 1; try { scope(); } finally { ReactCurrentBatchConfig.transition = prevTransition; } }