Top most React Interview question Part — 01
- Differentiate between Real DOM and Virtual DOM?
DOM means document object module. Real dom is an original dom of webpages on the other hand virtual dom is a representation of real dom. DOM is a tree structure. When an event occurs whole of the document will be updated in real DOM. But In virtual dom only updated which data has been event occurs. After the updated data or rendering code, virtual dom is faster than real dom.
2. What do you understand by Virtual DOM? Explain its works.
Virtual dom is a representation of real dom. DOM(document object module) is a tree of entire HTML web pages. When an event occurs or a state changes it only updates which data has been event occurs or state changes.This reason it more faster than real Dom and it was lightweight also.
3. What is React? why do you use react in the application?
React is a javascript library developed by Facebook in 2011 and 2012. We can data updated without any reload. Because it has a virtual dom. Basically, virtual dom is a representation of real dom. We can only update which data needs to be updated. React state management system, UI reusable components, virtual dom which makes better performence and clean architecture.
4. What are the key features of React?
- JSX
- Virtual dom
- components
- Performance
- Extention
- Clean code architecture
5. List some of the major advantages of React and What are the limitations of React?
Advantages :
- Easy way to learn.
- Seo friendly
- JSX
- Virtual dom
- Components
- Extention
Disadvantages :
- Documentation complexity
- Development Speed
- JSX Complexity
- Seo problem
6. what is JSX, and how does it work?
JSX means javascript XML or javascript syntax extension. It allows us to write HTML and JavaScript code in our browser. The browser can't understand JSX. It only understands JavaScript.So we use babel which is javascript compiler or transpiler.