سلام کد پیش فرض در ری اکت نیتیو که واسه app.js هست با کدی که توی آموزش هست فرق دارد و من در درس state ها به مشکل برخوردم ممنون میشم کمک کنید
ارور ---> SyntaxError: D:\react-native\oneproject\App.js: Unexpected token, expected ";" (18:20)
import React from 'react';
import {
SafeAreaView,
StyleSheet,
ScrollView,
View,
Text,
StatusBar,
Image,
} from 'react-native';
import {
Colors
} from 'react-native/Libraries/NewAppScreen';
import Mult from './components/mult'
const App: () => React$Node = () => {
constructor(props){
super(props);
this.state={
timer:1,
}
}
return (
{this.state.timer}
);
};
const styles = StyleSheet.create({
scrollView: {
backgroundColor: Colors.lighter,
},
engine: {
position: 'absolute',
right: 0,
},
body: {
backgroundColor: Colors.white,
},
sectionContainer: {
marginTop: 32,
paddingHorizontal: 24,
},
sectionTitle: {
fontSize: 24,
fontWeight: '600',
color: Colors.black,
},
sectionDescription: {
marginTop: 8,
fontSize: 18,
fontWeight: '400',
color: Colors.dark,
},
highlight: {
fontWeight: '700',
},
footer: {
color: Colors.dark,
fontSize: 12,
fontWeight: '600',
padding: 4,
paddingRight: 12,
textAlign: 'right',
},
});
export default App;
2023 © Copyright کليه حقوق مادی و معنوی براي چسبون محفوظ است و هرگونه کپی برداری پیگرد قانونی دارد.