What is the use and functionality of render in react-native?

Viewed 7843

what is the actual use of render().why we use this? Can we use this in both functional and class based components?

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

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


AppRegistry.registerComponent('AwesomeProject', () => HelloWorldApp);
1 Answers
Related