All About React You Have To Know
1. About React
React was created by Jordan Walke, and its a front end javascript library that makes user interfaces and also UI Component (user interfaces). React is a library, not a framework. React is a component based and flexible JavaScript library. All component are created with React using JavaScript, not special template language.
2.Know About Virtual DOM
Dom means “Document Object Modal” Which represents the making structure of HTML and CSS on the webpage. That shows all the page contents as an object that can be modified. We think dom a like a tree.
3. Learn about React DOM
React Uses Dom for increase it’s performance. It is a package that provides DOM specific methods that can be used at the top level of a web application. It also provides the developers with an API here is the more methods that’s provide
- render()
- findDOMNode()
- unmountComponentAtNode()
- hydrate()
- createPortal()
4. Let’s Know JSX
JSX work for JavaScript XML. JSX allows us to write HTML in React. JSX makes it easier to write and add HTML in React. We use Jsx because it’s run faster then venila javascript. It optimize code very fast and it make easier to code.
5. Component Lifecycle
Every React Application based on many components. Everything in a React application is a component or part of a component. Components are designed to follow like a natural cycle of life. They are born (created), grow (updating), and finally die (deletion). This is called the component lifecycle.
6. State in React
In React, the component state is like a temporary memory where we can set value and use the value when need. when we update the components it automatically re-render the components. Most of the time react state use to store some value of a component
7. Props in React
Actually, a React application based on many components. every component has some specific data that we need to pass to other component. Notice that pops pass data only uni-directional flow. ( one way from parent to child)
8. Default Props in React
defaultProps is a property in React component that use to set default values for the props argument. It will be changed if the prop property is passed. defaultProps can be defined as a property on the component class itself, to set the default props for the class.
9.Functional Component
JSX code always returned by a function. and functional component is basically a JavaScript function that returns a React element it also accepts props as an argument and returns valid JSX.
10. Class Component
There are many kind of component class component one of them and the Class components are ES6 classes that return JSX. For using state we use class component