1.What are the salient features of React.js?
Instead of the usually implemented real Document Object Model (DOM), React.js uses the simulated version, that is the virtually configured, DOM. The simulation comes with its best advantages.
Architecture afar HTML
The fundamental architecture of React can be applied beyond translating the HTML in the browser.
Unilateral Data Flow
2.What do you understand by Virtual DOM? Explain its working.
3.Distinguish between Real and Virtual DOM.
1. It upgrades slowly and gradually.
2. It can directly upgrade HTML.
3. It generates a brand-new DOM if the element upgrades
4. DOM exploitation is very costly.
5. Lot of memory would be wasted.
1. It upgrades much faster.
2. It cannot directly overhaul the HTML.
3. Intead, it upgrades the JSX if element also is upgraded.
4. But here DOM exploitation is very cost-effective.
5. No memory wastage is found.
4. What are the differences between React.js and Angular.js?
1. Build-in Structure
2. Furnished Rendering
4. Data Binding
Merely the View aspect of MVC
Server-side rendering is facilitated.
Uses the simulated virtual DOM
Only the One-way data binding
Debugged in compile -time
The whole part of MVC
Client-side rendering is facilitated.
Uses the actual DOM
Two-way data binding can be done.
Debugged in Run-time.
5. What is Properties?
Properties or commonly known as Props are the components that can only be read. And the key characteristic of which is its unchangeable nature. They are always crossed over across from the parent to the progeny components in all of its application. So a progeny component can never send a property back to its original parent component. This feature assists in keeping the unilateral data flow and are usually used to render the dynamically created data.
6. Define State and its usages in React.js
States are the integral part of React components. States are the original spring of data and should be kept in a simple format. Generally, states are the objects which regulates the components rendering and its conduct in relation to it. They are easily malleable unlike the properties and generate lively and interactive components. They can be accessed through this.state().
7. Distinguish between states and properties.
1. Collect initial value from the originator component.
|2. Source component can alter the value||No||Yes|
|3. Set standard values within component||Yes||Yes|
|4. Alters within component||Yes||No|
|5. Set inceptive value for child components||Yes||Yes|
|6. Alters inside child components||No||
8. What is the Higher Order Components (HOC)?
Higher Order Component is an improved and breakthrough way of using all over again the component logic. Usually, it is a motif that is obtained from React’s configuration structure. HOC is customized components which bounds together another component and includes it. They can concede to any potent progeny component but they will not amend or duplicate any conduct from their input components. So it is suggested that HOC are ‘pure’ or “unadulterated” components.
9. Differentiate between Stateful and Stateless Components in React.
|Stateful Component||Stateless Component|
|1. Stores the information about the component’s state alteration in memory phase.||1. Computes the inner state of the components|
|2. Authorized to alter its state||2. It Does not have the authority to alter the state|
|3. Constitutes of the knowledge of past, present and potential future alterations in state||3. Constitutes of no pre-knowledge of past, present and potential future state alterations.|
|4. Stateless components inform them about the needs of the state alterations, then they send forth the properties to them.||4. They get the properties from the Stateful components and regards them as call-back functions.|
10. What is Redux and explain it?