ReactJS Interview Questions and Answers
What is React
it follows a component-based approach. Tha react package contains only the functionility necessary to define React components.
it is typically used together with a React renderer like react-DOM for the web or react-native for the native envirnment.
What are the features of ReactJS?
Uni-directional data flow or data binding
List some of the major advantages of React\
Increase the performance of the applications
Easy to integrate
Easy to write UI test cases
Can be used on the client as well as server-side
What is JSX
Boosts up the JS Performance
What do you understand by virtual DOM? Explain its working
This Virtual DOM works in simple steps
- Whenever any underlying data changes. the entire UI is re-rendered in virtual DOM representation.
- Then the difference between the previous DOM representation and the new one is calculated.
- Once the calculations are done, the real DOM will be updated with only the things that have actually changed
How did React syntax change from ES5 to ES6?
What are the features introduced in ES7?
ECMAScript 2016 introduced two new features.
- Array.prototype.include():- it checks the array for the value passed as an argument. it returns true if the array contains the value, otherwise. it returns false.
- Exponentiation Operator: ECMAScript 2016 introduced the exponentiation operator, **. it has the same purpose as Math. pow().
How can you update the state of components?
What do you mean by Event Pooling?
This means that the SystheticEvent object would be reused and all propertiec would be nullified after the event handler has been called. For example, earlier this would not work: