Skip to content

Commit 0e6cb59

Browse files
coadofacebook-github-bot
authored andcommittedJan 16, 2025·
Replace $FlowFixMe generated in StaticRenderer snap and migrate to the 'export' syntax (#48667)
Summary: Pull Request resolved: #48667 Changelog: [General][Changed] - refactored StaticRenderer syntax Reviewed By: javache, elicwhite Differential Revision: D68155216 fbshipit-source-id: a9ea2adef8e2d5aeaac5be4ec4a021595c4edf1f
1 parent 1b15f57 commit 0e6cb59

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed
 

‎packages/react-native/Libraries/Components/StaticRenderer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
'use strict';
1212

13-
const React = require('react');
13+
import React from 'react';
1414

1515
type Props = $ReadOnly<{
1616
/**
@@ -34,4 +34,4 @@ class StaticRenderer extends React.Component<Props> {
3434
}
3535
}
3636

37-
module.exports = StaticRenderer;
37+
export default StaticRenderer;

‎packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2433,16 +2433,15 @@ declare module.exports: SoundManager;
24332433
`;
24342434

24352435
exports[`public API should not change unintentionally Libraries/Components/StaticRenderer.js 1`] = `
2436-
"declare const React: $FlowFixMe;
2437-
type Props = $ReadOnly<{
2436+
"type Props = $ReadOnly<{
24382437
shouldUpdate: boolean,
24392438
render: () => React.Node,
24402439
}>;
24412440
declare class StaticRenderer extends React.Component<Props> {
24422441
shouldComponentUpdate(nextProps: Props): boolean;
24432442
render(): React.Node;
24442443
}
2445-
declare module.exports: StaticRenderer;
2444+
declare export default typeof StaticRenderer;
24462445
"
24472446
`;
24482447

0 commit comments

Comments
 (0)
Please sign in to comment.