Intro to JSX
Basics
Consider the following:
It looks like a mix of javascript and HTML, and it is called JSX, which you will see a lot in React based applications. It contains an opening tag and a closing tag.
In React Native, the idea behind it the same, except the syntax might be slightly different:
In this example, we declare a variable name and embed it inside the JSX element with curly brackets:
JSX can contain children:
Components
Components are independent and reusable bits of code.
Last updated