Design comparison
SolutionDesign
Solution retrospective
I would love your feedback
Community feedback
- @SeyBooPosted over 2 years ago
Hello ! Bravo for your first react solution ! For best practice you could :
- Create a file for every component that you created so it's easier to read
- The App file is not a component so i shouldn't be in the components folder
- Instead of using
style={{display:show ? "":"none"}}
you should look for conditional rendering (I was doing the same mistake ahah)
https://reactjs.org/docs/conditional-rendering.html
const [showModal, setShowModal] = useState(false); {showModal ? <Modal /> : null } <button onClick={() => setShowModal(!showModal)}>Display modal</button>
Have a nice day :)
Marked as helpful0@Icekid35Posted over 2 years ago@SeyBoo thanks for the tips I'll surely improve on them
1 - @denieldenPosted over 2 years ago
Hi Icekid, great work on this challenge! 😉
Here are a few tips for improve your code:
- add descriptive text in the
alt
attribute of the images of users and not user for all - use
p
for the text and notspan
element - add
transition
on the element with hover effect - instead of using
px or %
use relative units of measurement likerem
-> read here - if I click on the upvote
button
I can increase it to infinity and not just by 1 point. add a control - i can comment also with empty comment or with blanks, add a control... The
trim()
method can help you -> read here
Overall you did well 😁 Hope this help!
0@Icekid35Posted over 2 years ago@denielden thanks alot for all the tips, I surely make use of them
1 - add descriptive text in the
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