10 Interesting thing about React

Z anika Nibir
2 min readMay 7, 2021

--

1.Why React is a Library, not a framework

If we expound the difference between library & framework with an example, A library is building a house from scratch.so in this you can choose the size the place of your room. On the other hand framework is buying a new house so In this term you cannot choose the degine, size of your room because it is already built.

So we can acquaint with that React is a library because it give us full control of our application. React give us what we want to build application smoother. It also gives us instruction how we use it

2.JSX in React

React component has render function and that specifies the html output of react component. JSX is a react extension and it allows writing js like HTML. With the help of JSX we can write html code in JavaScript, even js code in HTML. After that, babel which is a compiler of react module that helps to convert JavaScript code from html code.

3.JS in React

As we have already known that React is a library of javaScript.So In react to make html dynamic we use js.

4.React is Declarative

It is declarative that means if we want to Add , remove or any other thing we jusst tell that react and it will work from there.No need to worry how to add different element in the webpage have to change. we just declare and react build it.

5.Data goes down

We can send data bottom to down component. When we send data parant to child we use props

6.State

When we want to make component dynamic by sending dynamic value, we use state in react.

7.Events go up

In react parent component need create an event and the data send from child component.

8.Rendering process in React

It is most important procedure.in react render is the only required method for class components.The process is responsible for describing view to be rerender to the browse window.

9.Default props

We can use it when we want to use props and need not change that we can use default props.

10.Virtual DOM

In react ui every part is a component. And every component is a state. When we change a state, react update a virtual DOM tree. Once the virtual DOM the has been Updated, React compare it with the previous one. And change the state what we want

--

--