React Interview Questions

-
What is React?
-
Who developed React?
-
What is a component in React?
-
What are functional components?
-
What are class components?
-
What is JSX?
-
Why do we use JSX?
-
How do you create a React component?
-
What is the difference between a class component and a functional component?
-
What are props in React?
-
What is state in React?
-
How is state different from props?
-
What is the virtual DOM?
-
How does React use the virtual DOM?
-
What is the lifecycle of a React component?
-
What are lifecycle methods?
-
What is
componentDidMount()
? -
What is
componentDidUpdate()
? -
What is
componentWillUnmount()
? -
What is a hook in React?
-
Name some common hooks in React.
-
What is
useState
hook? -
How does
useEffect
work? -
What is the difference between
useEffect
and lifecycle methods? -
What is a controlled component?
-
What is an uncontrolled component?
-
How do you handle events in React?
-
What is the difference between HTML events and React events?
-
What is conditional rendering?
-
How do you do conditional rendering in React?
-
What is the difference between React and Angular?
-
What is the purpose of keys in React lists?
-
Why should keys be unique?
-
What is the
React.Fragment
? -
How do you pass data between React components?
-
What is lifting state up?
-
What is context in React?
-
When should you use React Context?
-
How do you create a context?
-
What is Redux?
-
How does Redux work with React?
-
What is the difference between Redux and React Context?
-
What are Higher-Order Components (HOC)?
-
What is the purpose of HOCs?
-
What are React refs?
-
How do you create refs?
-
What is the difference between controlled and uncontrolled inputs?
-
How do you optimize React performance?
-
What is React.memo?
-
What is the difference between React.memo and PureComponent?
-
What is prop drilling?
-
How do you avoid prop drilling?
-
What is the use of
useCallback
hook? -
What is the use of
useMemo
hook? -
What are React portals?
-
How do portals work?
-
What is error boundary in React?
-
How do you create an error boundary?
-
What is server-side rendering (SSR)?
-
What is the difference between client-side rendering and server-side rendering?
-
What is React.lazy?
-
How does code splitting work in React?
-
What is Suspense in React?
-
What is the purpose of keys in React lists?
-
How do you handle forms in React?
-
What is the difference between useState and useReducer?
-
What is the role of the React Router?
-
How do you implement routing in React?
-
What is the difference between React Router v5 and v6?
-
What is reconciliation in React?
-
What is the use of
shouldComponentUpdate()
? -
What is a PureComponent?
-
What is the significance of the
key
prop in React? -
What are synthetic events in React?
-
How do you pass arguments to event handlers?
-
How do you prevent default behavior in React events?
-
What is the difference between state and props?
-
What is lifting state up?
-
What is a React hook?
-
What is the useEffect cleanup function?
-
How does React handle forms?
-
What is the difference between controlled and uncontrolled forms?
-
What is the difference between React 16 and React 17?
-
What are fragments in React?
-
What is JSX?
-
Can browsers read JSX directly?
-
How is React different from Vue?
-
What is React Native?
-
What is reconciliation?
-
What is a pure function component?
-
What is React Fiber?
-
What is the use of default props?
-
How do you set default props in React?
-
What is propTypes?
-
How do you validate props in React?
-
What is Strict Mode in React?
-
How do you update state in React?
-
What is event delegation in React?
-
What is the use of keys in React lists?
-
What is the difference between React and ReactDOM?