Let’s Talk About React
Hello everyone, Welcome back to a new article.
Today I am going to talk about the React
In this article, I will talk about 10 topics of React that will help you to understand what is react and how it works, and a few more things about react.
Let’s dive into the main topic without wasting any more time.
1.What is Reat
At first, we are going to discuss what is React exactly?
React is a JS framework that will help you to create a beautiful modern user interface very easily. it’s one of the most popular frameworks right now which is being used by a lot of big companies like Facebook and Netflix.
2.Difference Between Library and Framework
The library has some roles. if you want to use a library you must have to follow them. If you break any of them then your codes will not work.
But the framework is different. You can code the way you want.
This is the simplest explanation of what is the difference between library and framework.
3.Why React is Best
There’s a lot of reason why react is best to use for your project.
Here I am going to tell you some of the main reasons for it.
React is super powerful and very fast as well. You can apply all the knowledge of vanilla javascript here. Also, it’s being used by the world’s most popular companies like Facebook and Netflix
4.React Virtual DOM
DOM stands for “Document Object Model”. The DOM in simple words represents the UI of your application.
The virtual DOM is only a virtual representation of the DOM. Everytime the state of our application changes, the virtual DOM gets updated instead of the real DOM.
5.How React Works
How React works? it’s very easy to understand. To understand this, let me ask you a question, what you have to do in react?
The answer is if you want o to create a user interface you don’t have to create everything one by one. Rather the codes are already written in the backend. All you have to do is just tell the React app what you want to do. It will do that for you. Super simple. This is how react works.
6.React Components
Essentially, components are reusable UIs that allow you to split the app into separate blocks that act independently of each other.
Components accept an arbitrary input with data (a prop) and return a React element to declare what should appear on the screen. They can interact with other components via props to create a complex UI.
7.React useState Hook
useState
is a Hook that allows you to have state variables in functional components. You pass the initial state to this function and it returns a variable with the current state value (not necessarily the initial state) and another function to update this value.
8.What is JSX
JSX is noting but writing JavaScript and HTML tother without any problem. It makes your coding life a way easier and helps you a lot more to create better UIs.