Learn React in 24-hours

du nguyen
du nguyen
Nov 5 · 1 min read

React is framework help you develop web application easily and effectively. It support many techniques to reduce life development and improve experiences of users without have knowledge about web structures.

I began to learn React at 4/11/2019 and completed it exactly 24 hours. In this article, I will cover all important concepts in React and how to use it to increase your programming skill and web development insight. Let’s begin.

Firstly, React let our compose complex UIs from small and isolated pieces of code called “Component”. To create new component, we will create new class which extend Component class of React. You can see example in below.

class ShoppingList extends React.Component {
render() {
return (
<div className="shopping-list">
<h1>Shopping List for {this.props.name}</h1>
<ul>
<li>Instagram</li>
<li>WhatsApp</li>
<li>Oculus</li>
</ul>
</div>
);
}
}

Obviously, ShopingList is called a Component. We can use this component to build complex other component instead of put all them in same script. (They are dirty, difficult to understand and modify 😫)

General, component class must have render method and state variable. React use them to render in DOM browers.

Continue…

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade