9.
When should you use functional components instead of class components in React?
When you only need to render simple UI elements.
When you don't need to manage state or lifecycle methods.
When you want to make use of React Hooks.
When you prefer class components over functional components.
Correct: A, B, C
Functional components are recommended in the following scenarios:
When you only need to render simple UI elements and don't require complex logic.
When you don't need to manage state or lifecycle methods. Class components are generally used when state and lifecycle methods are required.
When you want to make use of React Hooks, which allow you to use state and other React features in functional components without creating a class component.