If a condition is true or false, conditional rendering describes the ability to render various user interface (UI) markup. It's possible to render alternative items or components based on a condition in React. In the following instances, this notion is frequently used: Using an API to render external data.
Conditional rendering is a pattern that allows you to render different parts of your application based on the state of the application.
Functional components are a better choice for performance-sensitive apps. They are also useful when you want to build reusable modules or components with a modular architecture.