Learning ReactJS - Introduction

Learning ReactJS - Introduction

Hello Everyone This Article is part of my #2Articles1Week Challenge Series.

This Article is the Second article for my Learning ReactJS series. In this article, we will take a look at what ReactJS is, why it was made, who made it, who maintains its, why you should we use it, Projects it fits and we will also see it's example code.

What is React?

React is a front-end JavaScript library used for building user interfaces, It's used for the view layer of an application. It can be used to develop a Single Page Application (SPA) or a Mobile Application.

Why was React Made

The main purpose of React is to be fast, scalable, and simple, it allows developers to create large web applications that can change data, without reloading the page.

Who made it.

React was created by Jordan Walke, a software engineer working for Facebook. React was first deployed on Facebook’s newsfeed in 2011 and on Instagram in 2012.

Who maintains it.

React is maintained by Facebook and a community of individual developers and companies.

Why Should you use React

There are lots of reason to use React in your application:

  • React is Declarative: With simple views designed for each state in your application, React efficiently update and render just the right components when the data changes, thus making it easy to create interactive UIs.

  • React enables developers to reuse components: React provides a component-based structure. In React, your application comprises of components. You start with building small components like buttons, checkboxes, dropdowns, menus, etc. and create wrapper components around these smaller components. These components can be reused anytime in your application.

  • Learn Once, Write Anywhere: Not only for Web App, React can also render on the server using Node and power mobile apps using React Native, It can also be used in VR(Virtual Reality) using React360.

  • Easy to Learn: React is a light-weight front-end library, focusing only on the View layer, It's not a full MVC framework (It's only the V in MVC ), a JavaScript developer can start learning the basics and develop an application in few days, To start learning react you need a basic knowledge of HTML, CSS and JavaScript.

  • Great Developer Tools: It offers React Developer Tools for debugging your React application, it can be installed as a chrome extension on Chrome and also as an extension on Mozilla Firefox.

Screenshot (23).png

Project it fits

React can be used to build projects like a Single Page Applications, E-commerce Application and Blogs too.

Sample Code

Here is a simple Greetings code in React.

class Greetings extends React.Component {
  render() {
    return (
      <div className="container" id="">
        <p>Hello {this.props.name}, I trust you are fine.</p>
      </div>
    );
  }
}

ReactDOM.render(
  <Greetings name="Nzaki" />,
  document.getElementById('app')
);

I hope you've learnt something from this article. Stay glued for more on this Series Learning React