diff --git a/example/index.tsx b/example/NotificationsExampleApp.tsx similarity index 97% rename from example/index.tsx rename to example/NotificationsExampleApp.tsx index c9b94f705..9f88de38d 100644 --- a/example/index.tsx +++ b/example/NotificationsExampleApp.tsx @@ -1,6 +1,5 @@ import React, {useState, useEffect} from 'react'; import { - AppRegistry, StyleSheet, View, Text, @@ -15,7 +14,7 @@ import { Notification, } from '../lib/src'; -function NotificationsExampleApp() { +export default function NotificationsExampleApp() { const [notifications, setNotifications] = useState([]); const [openedNotifications, setOpenedNotifications] = useState([]); @@ -208,5 +207,3 @@ const styles = StyleSheet.create({ marginBottom: 5, }, }); - -AppRegistry.registerComponent('NotificationsExampleApp', () => NotificationsExampleApp); diff --git a/example/index.js b/example/index.js new file mode 100644 index 000000000..46326d5c1 --- /dev/null +++ b/example/index.js @@ -0,0 +1,4 @@ +import {AppRegistry} from 'react-native'; +import NotificationsExampleApp from './NotificationsExampleApp'; + +AppRegistry.registerComponent('NotificationsExampleApp', () => NotificationsExampleApp);