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:
Tim Yung
2025-05-17 17:18:55 -07:00
committed by Facebook GitHub Bot
parent bfb177cd9e
commit 42d2b1f675
2 changed files with 2 additions and 4 deletions
@@ -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;
+1 -1
View File
@@ -203,7 +203,7 @@ jest
__esModule: true,
default: jest.requireActual(
'../Libraries/Components/RefreshControl/__mocks__/RefreshControlMock',
),
).default,
}))
.mock('../Libraries/Components/ScrollView/ScrollView', () => {
const baseComponent = mockComponent(