Hola hola,
If you're looking to use React Navigation instead of Expo Router, then this quick guide should be helpful.
There are two steps:
- Update the
main
prop of yourpackage.json
to point to your new entry file
{
"name": "pcexpo",
"main": "./src/App.tsx",
"version": "1.0.0",
...
2.Export your entry file using the registerRootComponent provided by Expo.
import React from 'react';
import { registerRootComponent } from 'expo';
import { View, Text, StyleSheet } from 'react-native';
export const App = () => {
return (
<View style={styles.container}>
<Text style={styles.text}>Welcome to my App!</Text>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
text: {
fontSize: 20,
fontWeight: 'bold',
},
});
export default registerRootComponent(App);
That should be all you need!
Top comments (0)