Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Advice Generator App with Accessibility Elements

accessibility, fetch, bem
Levi Kuhaulua•220
@LeviKuhaulua
A solution to the Advice generator app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I like how I was able to add a loading event for the webpage in addition to the button so that when users enter the page, the advice slip will load as well instead of it being empty and having to press the button to get a random piece of advice.

What I would do differently / improving this project:

  • Implementing some sort of loading screen or visual component to show that the advice generator is working.
  • Maybe a way to disable the button clicks for two seconds or a visual indicator that the user has to wait before attempting to generate a random piece of advice again.
What specific areas of your project would you like help with?

One thing that I did have a question about in regards to best practices regarding JavaScript async/await and fetch is when you use .then() or .catch(), should you be nesting them? I suck at explaining lol so see code below for what I mean:

getAdvice()
  .catch()

OR 

getAdvice()
.catch()
Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Levi Kuhaulua's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License