React Native "Hello World"


import React, { Component } from 'react';
import { Text } from 'react-native';

export default class HelloWorldApp extends Component {
  render() {
    return (
      <Text>Hello world!</Text>
    );
  }
}

This is JSX - a syntax for embedding XML within JavaScript.It looks like HTML on the web, except instead of web things like div or span, you use React components.

Previous
Next