A Basic Introduction of React

What is React?

The main thing almost many people confused about ‘React’. Like, is it a ‘Framwork’ or a ‘Library’? Like many people, I had also confused. Let’s learn some basic things about React including that is it a ‘library’ or ‘framework’.

1.It is a library: First of all React is a ‘library’ of JavaScript. Many people think that React is a framework, but it is not. Angular or Ember are frameworks of JS.

2.React Focused on building user UI: Using React can fast UI system without doing much work.

3.It has a developer tool in chrome: If you face problems during using React apps, you can make sure that whether your build process is set up correctly by using ‘React Developer Tools for Chrome’. But first, you have to install it as a chrome extension. How can this extension help you to understand that your React setup is correct? Well, the React chrome extension will darker and brighter if the setup is okay.

4. JSX: JSX is an inline markup like HTML and it can transfer to JavaScript. In another word, JSX is an extension syntex that helps React to write easily HTML and JavaScript together. It also has an open and closing tag. You can understand the type of React element by the first part of the JSX tag. For example, React component is symboled by the Capitalized types of the JSX tag.

5. Component: React Component is like a JavaScript function or class that takes an optional input, for example, props or property, and returns a React element that describes how the UI will look like. React Components are two Types. One is ‘class type’ which is stateful and another is ‘functional type’ which is stateless.

6. Data Transfer: By using React you can transfer data easily by ‘props’ from parent component to child component.

7. State: In React, React component has a state object where data stored dynamically. If data changes, the state changes dynamically and re-renders the components.

Sisilia