I want a use case example of when react class components are needed for a project over a react functional component and vise versa. I cant seem to understand the difference between the two.
It’s mostly historical. React components were originally all class components. Function components were introduced in a later version of React. Going forward you should use function components.