Intro to React
- 1
- 0
- 0
- 0
- 0
- 0
React is an open source JavaScript library for building user interfaces. MVC stands for Model-View-Controller, React is the View in this. Before intro to React, you need to have Javascript knowledge. Here an overview of this JavaScript to check your knowledge level.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript
If everything is fine, let’s start.
Some advantages of using React:
Components: Applications can be divided into smaller components. It means that the components can be reused more easily in your app. You will understand better with the example below.
Props: This simply is shorthand for properties. Props are how components talk to each other.React’s data flow between components is uni-directional (from parent to child only).
State: State data can be modified by its own component, but is private (cannot be accessed from outside).So state is used so that a component can keep track of information in between any renders that it does. When you setState it updates the state object and then re-renders the component.
Virtual Dom: React compares the virtual DOM with a virtual DOM snapshot that was taken right before the update.Once React knows which virtual DOM objects have changed, then updates those objects on the real DOM. This makes a big difference! React can update only the necessary parts of the DOM. React’s performance comes largely from this innovation.
This is just a brief into into React. For more information on getting started, and deeper look into React, visit the React web page at: https://facebook.github.io/react/
End of the Intro to react blog.
1 Yorum
Popüler Yorumlar
Very good articles, I was very interested in the subject, and you expressed your explanations well through beautiful examples!
Tüm Yorumlar
Very good articles, I was very interested in the subject, and you expressed your explanations well through beautiful examples!