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

Advice Generator using React

Robert 300

@romanrobert

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


Hello 🖖,

Started learning React, and this was a really nice project to solidify what I learned so far.

What I noticed is that the advice is cached for 2 seconds and any repeated request within 2 seconds will return the same piece of advice.

Feedback is always welcomed.

Community feedback

@Eileenpk

Posted

Hi Robert! your project looks nice and clean. About the advice being cached for 2 seconds and any repeated request within 2 seconds returning the same piece of advice, I ran into the same thing when I did this project, after a half-hour debug session trying to find why it was doing that I found this on the docs for the Advice Slip API they have a note that says - Note: Advice is cached for 2 seconds. Any repeat request within 2 seconds will return the same piece of advice.

If you found this helpful please mark it as such :) Let's connect on LinkedIn! www.linkedin.com/in/eileen-dangelo

Marked as helpful

1

Robert 300

@romanrobert

Posted

@Eileenpk

Hi Eileen, Thanks for the feedback, much appreciated. Linkedin request sent. Have a nice day and happy coding!

0

@Eileenpk

Posted

@romanrobert request accepted 👍 If you ever need anything or want to team up on something (I've been thinking about trying pair programming) let me know.

0

@Rahulbaran

Posted

Good evening/morning Robert, I am Rahul from Bharat(India). Here is my feedback:-

  • Use heading tag for large font-sizes (wrap quote in h1 tag instead of p).

  • CSS Custom properties are very handy and make your code maintainable. Learn to use them (An article by Smashing Magazine, if you are interesed to read)

  • Wrap dice image inside a <button> tag instead of <span>, since it is a button and you should keep accessiblity in mind.

  • Always use catch() along with then() to handle an error while making the request.

  • No need to import React in App.jsx.

Marked as helpful

0

Robert 300

@romanrobert

Posted

@Rahulbaran

Hello Bharat,

Thank you for the feedback, highly appreciated.

0

@Rahulbaran

Posted

@romanrobert , I am happy to know this.

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