diff --git a/packages/rn-tester/js/components/RNTesterPage.js b/packages/rn-tester/js/components/RNTesterPage.js
index c3bcd4ba633633..71342f255ba630 100644
--- a/packages/rn-tester/js/components/RNTesterPage.js
+++ b/packages/rn-tester/js/components/RNTesterPage.js
@@ -9,9 +9,9 @@
*/
import {RNTesterThemeContext} from './RNTesterTheme';
+import RNTesterTitle from './RNTesterTitle';
import {useContext} from 'react';
-const RNTesterTitle = require('./RNTesterTitle');
const React = require('react');
const {SafeAreaView, ScrollView, StyleSheet, View} = require('react-native');
diff --git a/packages/rn-tester/js/components/RNTesterTitle.js b/packages/rn-tester/js/components/RNTesterTitle.js
index 948a0e89ca6188..d5955fd2b21039 100644
--- a/packages/rn-tester/js/components/RNTesterTitle.js
+++ b/packages/rn-tester/js/components/RNTesterTitle.js
@@ -9,33 +9,34 @@
*/
import {RNTesterThemeContext} from './RNTesterTheme';
+import React from 'react';
+import {StyleSheet, Text, View} from 'react-native';
-const React = require('react');
-const {StyleSheet, Text, View} = require('react-native');
+type Props = $ReadOnly<{
+ title: string,
+}>;
-class RNTesterTitle extends React.Component<$FlowFixMeProps> {
- render(): React.Node {
- return (
-
- {theme => {
- return (
-
-
- {this.props.title}
-
-
- );
- }}
-
- );
- }
+function RNTesterTitle({title}: Props): React.Node {
+ return (
+
+ {theme => {
+ return (
+
+
+ {title}
+
+
+ );
+ }}
+
+ );
}
const styles = StyleSheet.create({
@@ -53,4 +54,4 @@ const styles = StyleSheet.create({
},
});
-module.exports = RNTesterTitle;
+export default RNTesterTitle;