Interview Questions and Answers
1. What is React JS?
Answer: React JS is a JavaScript library for building user interfaces, maintained by Facebook.
2. What are the key features of React?
Answer: JSX, Components, Virtual DOM, One-way data binding, and Performance optimization.
3. What is a component in React?
Answer: A component is a reusable piece of UI that can be a function or a class.
4. What is the difference between state and props?
Answer: Props are read-only and passed to components, while state is managed within the
component.
5. What is the Virtual DOM?
Answer: Virtual DOM is a lightweight JavaScript representation of the actual DOM.