⚠️ This guide is being written, not is finished, but i’m working to end this
React JS is a front-end JavaScript library used for building user interfaces. It is maintained by Facebook and a community of individual developers and companies. React JS allows us to create reusable UI components. It uses a component architecture, with each component having its own state and props.
Some of the main features of React JS are:
Just right now, react is a library. And this needs a simple js to run and introduce react syntax in your web site. This file is called main.js and includes a function to render everything that react needs.
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.jsx'
// React DOM is the responsible to build and incorporate React into your site
// createRoot is a function that receive an html element to paint or render elements.
// and then this element render a "Component" called (App)
ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<App />
</React.StrictMode>,
)
Components it’s the most important thing what you need to build a react app. Everything in React is builded as a component, for example a button, checkbox, input, label, titles, navbar, banner, etc. Each component includes