/
githubmirror
/
react-native
Обзор
Документация
Войти
/
githubmirror
/
react-native
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/jest-preset/jest/RefreshControlMock.js
32 строки
804 B
Phil Pluckthun
Split out Jest preset to `@react-native/jest-preset` (#55169)
18 фев 2026, 20:32
18 фев 2026, 20:32
c4ae055
Код
Авторство
О чём код?
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict-local * @format */ 'use strict'; import type {HostComponent} from 'react-native/src/private/types/HostComponent'; import * as React from 'react'; import requireNativeComponent from 'react-native/Libraries/ReactNative/requireNativeComponent'; const RCTRefreshControl: HostComponent<{}> = requireNativeComponent<{}>( 'RCTRefreshControl', ); export default class RefreshControlMock extends React.Component<{...}> { static latestRef: ?RefreshControlMock; render(): React.Node { return <RCTRefreshControl />; } componentDidMount() { RefreshControlMock.latestRef = this; } }