Skip to content

elidrissidev/advice-generator-app

Repository files navigation

Frontend Mentor - Advice generator app solution

This is a solution to the Advice generator app challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the app depending on their device's screen size
  • See hover states for all interactive elements on the page
  • Generate a new piece of advice by clicking the dice icon

Screenshot

Mobile (375px) Desktop (1440px)
Mobile Desktop

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Mobile-first workflow
  • React - JS library

What I learned

This was an exciting challenge, I was able to use react-query for the first time to fetch the advice from the API and cache it, as well as handle the loading state. This is also the first time I test my work properly by insuring I mock the neccessary parts, like API endpoints.

Continued development

Testing, testing, and testing. Yeah, I need to get better at it. It was also a bit difficult to handle error state for refetches in react-query, so I'd like to understand that more in the future.

Author

License

This project is licensed under the MIT License.