css - React Native: Flex behaving differently -


import react, { component } 'react'; import { view, text, stylesheet, touchablehighlight } 'react-native';  class first extends component { render () {     return (         <view style = {styles.container}>             <text>                 hello world!             </text>         </view>     );     } }  const styles = stylesheet.create ({ container: {     backgroundcolor: 'yellow',     flex: 1 } });   module.exports = first; 

this code fills screen yellow in projects started react-native init shows nothing in projects started create-react-native-app. normal?

edit: mistakenly called styled view in main app.js.

stupid mistake; calling component styled view of main app.js. taking time out, guys.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -