React native from scratch

React
  • components component
  • JSX
  • props attribute
  • state state

A simple function can be used as a component

const Cat = () => {
   
    
    };

<> and </> A pair of JSX tags called Fragments (fragments)
The syntax of JSX requires that the root element must be a single element

custom components

ReactAllows you to create new components by nesting these components. These nestable and reusable components are the essence of Reactthe concept .

<View>and <Text>can be thought of as Htmldeveloping <div>and <p>tags.

Guess you like

Origin blog.csdn.net/aikongmeng/article/details/128788867