interactive-rating-component-react

Please log in to post a comment
Log in with GitHubCommunity feedback
- @mseidel819
This looks great! I like how you added the "rate again" functionality.
Another way you can switch between components is very similar to what you've done, but it might involve less lines of code:
Instead of checking for truthiness in each individual component, add a ternary to App.js. You'll also be able to get rid of the
isSubmitted
prop from each component.`<main> { isSubmitted ? <Thankyou rating={rating} handleSubmit={handleSubmit} /> : <Rating handleRating={handleRating} handleSubmit={handleSubmit} />
<Footer /> </main>`
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord