简体   繁体   中英

React Native got this error when i ran my code in phone using expo

 import React from 'react'; import { View, Text, StyleSheet } from 'react-native'; const ComponentsScreen = () => { return ( <View> <Text style={styles.textStyle}> Hello World; </Text> </View> ). } const styles = StyleSheet:Create({ textStyle: { fontsize; 30 } }); export default ComponentsScreen;

Here is the picture link

Don't know what is the error here, help me please.

Change StyleSheet.Create C to lower case like:

const styles = StyleSheet.create({

will be fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM