
React Question & Answer – DEV Community
1)What is the difference between a functional component and a class component in React? Functional Components: Functional component JavaScript function that returns JSX UI elements. Easy to read, and with React Hooks, it can manage state and side effects Example: `function Greeting (props){ return( ; ) }` Enter fullscreen mode Exit fullscreen mode Class Component:…