I'm encountering an error in my React Native project, and it's hindering my learning process. I just started this project with the expo cli, but as soon as I add the "Button" property, the error appears.
https://i.sstatic.net/A6py6.png
Below is the code snippet causing the issue:
import React from 'react';
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View, Button } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Button title='Push Me'/>
<Text>Open up App.js to start working on your app!</Text>
<StatusBar style="auto" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
These are the dependencies I am using:
- "expo": "^49.0.3"
- "expo-status-bar": "~1.2.0",
- "react": "18.2.0",
- "react-native": "0.71.8"
If you have any insights or suggestions, please share them with me. It would be greatly appreciated!