I am following a tutorial with React Native and emulating the result using the Xcode iPhone emulator, however I am stuck in this error message and cannot see what happened. I have another file that imports this component into the NavigatorIOS component.
var React = require('react-native'); var { View, StyleSheet, Text } = React; var styles = StyleSheet.create ({ mainContainer: { flex: 1, flexDirection: 'column', justifyContent: 'center', backgroundColor: '#eee' } }); class Main extends React.Component { render: function() { return ( <Text> Hello </Text> ) } }; module.exports = Main;
Inside the class body, methods are declared using
render() { ... }
not
render: function() { ... }
See the MDN documentation for more information .
Source: https://habr.com/ru/post/1608074/More articles:How to show storylines in a legend in Highcharts? - javascriptreturn of a permanent facility and construction from temporary - c ++Switching to ios 9 sdk gives exc_bad_access - iosDesign a data flow pipeline to handle multiple Pubsub partitions - google-cloud-platformPrint each item from a list in Erlang - listСмятение о объявлении типа данных float в С++ - c++Celery Error Email: Cannot get celery emails - pythonSearch for sets of vectors summing to zero - performanceУровень выставления счетов не соответствует ожидаемому диапазону - google-bigqueryHow to fit a polynomial curve to data using scikit-learn? - pythonAll Articles