0

I am working on a project in react native. I am getting a warning related to React 18. The message is Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17.

I have searched to resolve this but I only found the solution related to reactjs not react native. Please help me to solve this.

App.js

import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';

export default function App() {
return (
 <View style={styles.container}>
   <Text>Starting New Native Projecsft</Text>
   <StatusBar style="auto" />
 </View>
);
}

const styles = StyleSheet.create({
container: {
 flex: 1,
 backgroundColor: '#fff',
 alignItems: 'center',
 justifyContent: 'center',
},
});

Rahul Rajput
  • 21
  • 1
  • 3
  • I think you can get you full answer [here](https://stackoverflow.com/questions/71668256/deprecation-notice-reactdom-render-is-no-longer-supported-in-react-18) – Abal Dec 24 '22 at 11:40
  • @Abal, I have already read that one but didn't understand how to do this in react native. – Rahul Rajput Dec 24 '22 at 11:52

0 Answers0