Which of the following is the correct way to use conditional rendering in React with an if statement?
if (condition) { return <Component />; }
if (condition) { return Component() }
if condition return <Component />
if (condition) return <Component /> else return null
This question is part of this quiz :
Conditional Rendering In React