Design comparison
Community feedback
- @mseidel819Posted over 2 years ago
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>`0@abishekbardewaPosted over 2 years ago@mseidel819 Yes that is possible, I didn't realise when I was coding. Anyway thankyou very much for your feedback.
0
Please log in to post a comment
Log in with GitHubJoin 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