opendevs
opendevs logo
CoursesInterviewsBlogs

Happy sad Tommy

Solidify your knowledge of Conditional Rendering by solving this problem.
Effective switch

Your React component takes a boolean prop called isHappy and renders a different message depending on the value of that prop. If the prop is true, render a p tag with value that says Hey, I am Happy Today!, If the prop is false, render a p tag with value that says Hey, I am Sad Today!.


Solve this easy problem to earn  1  DevCoin image
Output
Coding Area
opendevs logo
CoursesFAQsContact UsPrivacy PolicyTerms Of Service
Copyright © 2023 opendevs
Learn ● Develop ● Ace
All illustrations by Storyset