Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

React JS

#react
Md Raihan Alamβ€’ 520

@Md-Raihan-Alam

Desktop design screenshot for the Advice generator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Any suggestion for update is welcome

Community feedback

Zineb Boutaaβ€’ 750

@zineb-Bou

Posted

Hi there, here are some suggestions that may help you to improve your code even further.

1- The card doesn't fit all the screen sizes, 590px <scren-size<700px the pattern divider gets overflow the card, your solution should be responsive.

2-The get request needs to be done when clicking on the dice button, you can be done using only the effect hook.

3- For accessibility purposes, you need to use the right HTML semantic element, so instead of using <dev> for the dice button use <button>. you also need to hide any images from the screen readers that have a decoration purpose.

Good luck πŸ˜ƒ

1
Rimkaβ€’ 600

@karimfilali

Posted

Hello! Good work with this project. Looking at your solution, I would like to suggest that you add the second parameter to the fetch method in your App.js file to enable it fetch new advice every time a user clicks the dice button. You could add something like this: fetch(url, { cache: "no-cache", }); Hope this was helpful..

1
Dev Rathoreβ€’ 2,600

@GitHub-dev12345

Posted

You want to reduce your accessibility, to change this code :

<div id="root"> to <main> (Used main tag for main design components);

I hope you find this helpful

0

Please log in to post a comment

Log in with GitHub
Discord logo

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