Text – React Native

  • The value of the text variable is rendered by using {text} .
  • text ; return ( { text } < / Text > ) } } // App registration and rendering AppRegistry .
  • The most basic component in React Native is the Text component.
  • import React , { Component } from ‘react’ ; import { AppRegistry , Text } from ‘react-native’ ; class TextBasicsWithState extends Component { constructor ( props ) { super ( props ) ; this .
  • import React , { Component } from ‘react’ ; import { AppRegistry , Text } from ‘react-native’ ; class TextBasics extends Component { render ( ) { return ( Hello World !

Read the full article, click here.


@necolas: “Looks like the official React Native documentation is going to use “React Native for Web” for interactive demos”


In this slightly more advanced example we will display the string “Hello World” retrieved from this.state on the device and stored in the text variable. The value of the text variable is rendered by using {text}.


Text – React Native