Forum

Introduction to React.js

Started by Terry Igho · 6 Replies
Posted: 1 y
React, sometimes referred to as a frontend JavaScript framework, is a JavaScript library created by Facebook.

React is a tool for building UI components.

How does React Work?
React creates a VIRTUAL DOM in memory.

Instead of manipulating the browser's DOM directly, React creates a virtual DOM in memory, where it does all the necessary manipulating, before making the changes in the browser DOM.

React only changes what needs to be changed!

React finds out what changes have been made, and changes only what needs to be changed.

  

<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/react@18/umd/react.development.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js" crossorigin></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
</head>
<body>

<div id="mydiv"></div>

<script type="text/babel">
function Hello() {
return <h1>Hello World!</h1>;
}

const container = document.getElementById('mydiv');
const root = ReactDOM.createRoot(container);
root.render(<Hello />)
</script>

Share on my timeline

David Estrada Joined: 40 w

Posted: 40 w
Supplementing with high-quality products ensures adequate intake, especially for those with restrictive diets or nutrient absorption issues. It's essential to address vegan supplements deficiencies promptly to prevent long-term health complications.

David Estrada Joined: 40 w

Posted: 39 w
Wireless lights offer flexibility in placement, allowing users to illuminate any area without constraints. With no cords or cables to worry about, they can be placed anywhere, what are the benefits of table lamps from ceilings and walls to shelves and countertops, enhancing ambiance and functionality.

Grace Mejia Joined: 41 w

Posted: 38 w
Facilitate bonding and social connection, bridging gaps between individuals and fostering a sense of community. Toys can act as outlets for weighted dinosaur stuffed animal emotional expression, allowing individuals to externalize their innermost thoughts and feelings.

David Estrada Joined: 40 w

Posted: 36 w
Green roofing for commercial buildings is gaining popularity due to its sustainability and numerous benefits. These fascia installation roofs are designed with vegetation, providing natural insulation, reducing urban heat island effect, and improving air quality.

Grace Mejia Joined: 41 w

Posted: 29 w
The MRA grant facilitates knowledge exchange and learning opportunities for venturing into new markets. SMEs can gain insights into market readiness assistance international business practices, cultural nuances, and market trends through participation in overseas activities.

Grace Mejia Joined: 41 w

Posted: 28 w
Weddings and anniversaries often call for special diamond earrings. Brides and celebrants choose earrings that diamond cross pendant complement their attire and enhance their overall look.