The most important things in JavaScript you should use

Toushiat shaikh
2 min readNov 5, 2020

React JS

At first you should know the defination of React JS . React JS is not a framework . It is a library of javascript . It is open source and user interface . React JS mainly used in single page web or mobile application . Key features of React JS are Components , Props & State , Events , Conditional Rendering , Lists & Tables , Forms & Input Elements .

Components

Everything in ReactJS is component. We can reuse component . It can use with other component . We can pass data from outside of component.It can have it’s own data . It can be styled separately . Component can be used as many time we want . Component has two layer one is data layer another layer is representation layer .

Props & State

In a React segment, props are factors passed to it by its parent part. State then again is still factors, however straightforwardly introduced and oversaw by the part. Props ought to never be changed in a youngster part, so if there’s something going on that modifies some factor, that variable ought to have a place with the segment state.

Props are additionally used to permit youngster segments to get to strategies characterized in the parent part. This is a decent method to unify dealing with the state in the parent part, and maintain a strategic distance from youngsters to want to have their own state.

Events

An event is an activity that could be set off because of the client activity or framework produced function. For instance, a mouse click, stacking of a site page, squeezing a key, window resizes, and different connections are called functions.

React has its own event dealing with framework which is fundamentally the same as taking care of functions on DOM components. The respond function dealing with framework is known as Synthetic Events. The engineered function is a cross-program covering of the program’s local function.

Conditional rendering

Conditional rendering as a term depicts the capacity to deliver distinctive UI markup dependent on specific conditions. In React-talk, it is an approach to deliver various components or segments dependent on a condition. The main work is rendering data from api . It show or hide element . The main functonality is Authentication and Authorization.

--

--