What are the issues with jQuery?
- It requires lot of DOM manipulation.
- It is slow in rendering UI.
- It requires lot of explicit AJAX.
- It is legacy type.
- It uses more memory.
Features of React :
- It is component based. **
- It is light weight.
- It is faster in rendering.
- It is easy to extend, maintain and test.
a) Reusability
b) Extensibility
c) Mantainability
d) Testability - It is modular.
- Application specific framework.
- It uses “Virtual DOM”. **
FAQ: What is DOM, Shadow DOM & Virtual DOM?
Ans:
DOM
- It is a hierarchy of elements in browser.
- HTML parsing comprises of following phases Markup=> Bytes => Chars => Tokens => DOM => Render => Layout => Paint
- HTML page comprises of elements arranged in a hierarchical order called DOM.
[Document Object Model]
Shadow-DOM
- It is a hierarchy of elements in a component.
- Component is built with shadow DOM.
- Component comprises of a Shadow Root.
Virtual DOM
- It is a copy of actual DOM in memory.
- React application updates into virtual DOM, which is later reflected into actual DOM.
- It makes rendering faster virtually.
Browser Architecture
- UI
- UI Backend
- Browser Engine
- Rendering Engine
- JavaScript Interpreter
- Network
- Data Persistance
Issues with React:
- It is not designed for what you are using.
- Hence lot of GAP’s.
- Lot of 3rd Party integrations.