1.What is ReactJS?
-ReactJS is a JavaScript library used for building user interfaces. It was developed by Facebook and is currently maintained by Facebook and a community of developers.
2. What are the key features of ReactJS?
– The key features of ReactJS are:
• Virtual DOM
• JSX syntax
• Component-based architecture
• Unidirectional data flow
• Reusable components
• High performance
3. What is JSX?
– JSX is a syntax extension for JavaScript that allows you to write HTML-like code in your JavaScript code.
4. What is a component in React?
– A component is a self-contained module that encapsulates a specific piece of functionality in a user interface.
5. What is a state in React?
-A state is an object that represents the current state of a component.
6. What is a props in React?
– Props (short for properties) are a way to pass data from a parent component to a child component.
7. What is a virtual DOM in React?
-The virtual DOM is a lightweight copy of the actual DOM that React uses to update the UI efficiently.
8. What is the difference between a state and a props in React?
-The main difference between a state and a props in React is that a state is managed within a component, while a props is passed down from a parent component to a child component.
9. What is the difference between a functional component and a class component in React?
-Functional components are defined as a function and return JSX, while class components are defined as a class and have a render() method that returns JSX.
10. What is the purpose of the componentDidMount() method in React?
–The component DidMount() method is a lifecycle method in React that is called after a component has mounted and is used to perform actions that require access to the DOM.
11. What is the purpose of the component DidUpdate() method in React?
-The component DidUpdate() method is a lifecycle method in React that is called after a component has been updated and is used to perform actions that require access to the DOM.
12. What is the purpose of the component WillUnmount() method in React?
– The component WillUnmount() method is a lifecycle method in React that is called just before a component is unmounted and is used to perform any cleanup actions.
13. What is the purpose of the shouldComponentUpdate() method in React?
-The shouldComponentUpdate() method is a lifecycle method in React that is called before a component is updated and is used to determine if the component should re-render.
14. What is the difference between a controlled component and an uncontrolled component in React?
– A controlled component is a component that is controlled by React state, while an uncontrolled component is a component that is controlled by the DOM.
15.What is the purpose of the setState() method in React?
-The setState() method is used to update the state of a component and trigger a re-render.
16. What is React Router?
– React Router is a library for routing in React applications.
17. What is Redux?
-Redux is a state management library for JavaScript applications.
18. What is Flux?
– Flux is a pattern for managing application state in JavaScript applications.
19. What is purpose of connect () method in Redux ?
– The connect() method is used to connect a React component to the Redux store.
20.What is middleware in Redux?
-Middleware is a function that sits between an action and a reducer in the Redux data flow.
21. What is the purpose of the combineReducers() method in Redux?
-The combineReducers() method is used to combine multiple reducers into a single reducer.
22. What is the purpose of the apply Middleware() method in Redux?
– The applyMiddleware() method is used to apply middleware to the Redux store.
23. What is the purpose of the bind Action Creators() method in Redux?
– The bind Action Creators() method is used