A. Introduction of the React

React is a javascript library developed by Facebook. It only supports iOS7.0 and above on iOS. React Native advocates componentized development, which means that React Native provides us with packaged components for developers to use, and even allows us to nest related components into new ones. React Native allows you to maintain the same core business logic code for multiple platforms (Web,Android, and IOS) to create Native applications.

React Native Development base environment

React Native development base environment

Create a new project

react-native init AwesomeProject

Compile and run the React Native application

cd AwesomeProject react-native run-ios

Integrate into existing native applications

Integrate into existing native applications

V. The life cycle of RN

Six. Personal summary

Comparison between Props and State

The same

  • Are used to describe component state
  • Can be changed, and changes can trigger different re-rendering of the component
  • Props is passed in externally and is a data flow from the parent component to the child component.
  • State is internally defined and represents the internal State of the component. Internal changes are not directly related to external components. Props usually change outside the component and remain the same inside. A component cannot change its own props, but is responsible for setting the props of its children.

7. Study websites

RN Chinese RN React Navigation Chinese React Navigation