mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
RN: Migrate to ESM - Libraries/Components/RefreshControl (#51431)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51431 Migrates files to use ESM to mitigate the existing lint warning. Changelog: [Internal] Reviewed By: SamChou19815 Differential Revision: D74942842 fbshipit-source-id: bc68b1a3422e97bafc23516e429877a6624f37a3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
bfb177cd9e
commit
42d2b1f675
+1
-3
@@ -19,7 +19,7 @@ const RCTRefreshControl: HostComponent<{}> = requireNativeComponent<{}>(
|
||||
'RCTRefreshControl',
|
||||
);
|
||||
|
||||
class RefreshControlMock extends React.Component<{...}> {
|
||||
export default class RefreshControlMock extends React.Component<{...}> {
|
||||
static latestRef: ?RefreshControlMock;
|
||||
componentDidMount() {
|
||||
RefreshControlMock.latestRef = this;
|
||||
@@ -28,5 +28,3 @@ class RefreshControlMock extends React.Component<{...}> {
|
||||
return <RCTRefreshControl />;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = RefreshControlMock;
|
||||
|
||||
Vendored
+1
-1
@@ -203,7 +203,7 @@ jest
|
||||
__esModule: true,
|
||||
default: jest.requireActual(
|
||||
'../Libraries/Components/RefreshControl/__mocks__/RefreshControlMock',
|
||||
),
|
||||
).default,
|
||||
}))
|
||||
.mock('../Libraries/Components/ScrollView/ScrollView', () => {
|
||||
const baseComponent = mockComponent(
|
||||
|
||||
Reference in New Issue
Block a user