-
This challenge was pretty straight forward. One of the main issues that occurred was the widths of the card and getting it just right. Since I am still learning how to effectively use TailwindCSS, it was weird getting exactly what I wanted.
-
As a beginner to React, the area where a lot of my concerns other than discussed above was my implementation of the state in React.
-
This project has guided me to dig deeper into best practices with TailwindCSS widths and React state implementation. Any advice on these would be much appreciated.
Rachael
@rachaelhrlmAll comments
- @mdubelbeisSubmitted over 2 years ago@rachaelhrlmPosted over 2 years ago
Hey there,
This is looking great! 🎊
The only thing I can think of to improve would be to update the submit button to only enable submit when a rating is selected. You could update your onFormSubmit function to only set submit to true if your selection state is not null.
As for the issue found in the accessibility report, wrapping your Rate and Thanks components within a <main> tag should fix that up.
Happy coding! 🐱
Marked as helpful0 - @ramirez2303Submitted over 2 years ago
This is mi first interactive app with react, before this i only make static pages, i don't know if the code can be more simplify, if that posible send my a message and i fix that
@rachaelhrlmPosted over 2 years agoCongratulations on completing the challenge! 🎊
This is looking good for your first try with an interactive react app!
It would be a good idea to prevent the user from submitting the form if a rating hasn’t been selected — either by disabling your submit button when your click state is null or wrap you onSubmit handler to only update the submit state if click is not null.
The accessibility issue from the report could also be solved by switching the wrapping react fragment in App with a main tag instead. And don’t forget to add alt to your images!
The only other very minor thing I can think to suggest is that you could just pass ratingNumber to your handleClick call on MotionBlur since that variable already holds i+1
I hope that helps.
Happy coding! 🐱
Marked as helpful1 - @malkavianleonSubmitted over 2 years ago@rachaelhrlmPosted over 2 years ago
Congrats on completing the challenge! 🎊
It might be good to stop the user from submitting the form when no rating is selected.
E.G if your item state is still an empty string, disable the submit button.
You could also solve the accessibility issues from the report by wrapping everything in App with a main tag rather than a react fragment. It would also help if you swapped the h2 tags with h1 to satisfy the other issue.
I hope that helps.
Happy coding! 🐱
Marked as helpful0