Some Fundamental React js Concept

Ayshiroy
3 min readNov 4, 2020

Today I am writing about React js fundamental concept…

What is React js?

React is a javascript “library” and you need to make all decisions by yourself. It is not exactly a “framework”. It focuses on helping you to build user interfaces using components. React is used to put together all the things we can use in the javascript and simplify them so that we can use them easily.

How to install react js?

If you install a react js application you should install this procedure in your terminal code…

What is React Component and how to create it?

The component has to include the extends React.component statement, this statement creates an inheritance to React.component and gives your component access to React.component’s functions.

when creating a React component, the component’s name must start with an uppercase letter. In your Component, you must import react from “node_modules/types/react/index”. The component also requires a return() method, this method returns HTML.

Example:

What is JSX in-depth?

JSX, or javaScript XML, is an extension to the Javascript language syntax. JSX allows us to write HTML elements in Javascript and place them in the DOM without any createElement () and appendChild() methods.

Example:

Why we use Props in react js and how to use Props types?

To pass information to any component using props. We had passed different types of information like integers, string, array, etc. you can either create default props or have passed props directly as attributes to the components. you can also pass props from outside of a component and using them inside that component.

Example:

you can use the prop type for Validation any data you are receiving from props. but before using it you will have to import it. then you can use different types of data-type value in your react component.

Example:

--

--

Ayshiroy
0 Followers

I am a front End web developer.