Coder Social home page Coder Social logo

advice-generator-app's Introduction

Frontend Mentor Project - Advice generator app

This project was an assignment from my accountability partner Smug to deepen my understanding of useEffects hooks in react. The project is a solution to the Advice generator app challenge on Frontend Mentor.

The challenge was to build out this advice generator app using the Advice Slip API and get it looking as close to the design as possible.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the site depending on their device's screen size
  • Student should be able to use and understand the intricacies of using useEffect & useState hooks in react

Screenshot

Links

Built with

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

What I learned

This particular project helped me go back the basics of setting up a react app, using props, & staying consistent with the mobile first work flow, as well as using semantic HTML.

In this particular project, I learnt that using useEffect hook, I had to employ the useState hooks: (i) To save the API data call into state, (ii) As well as, figuring out that when i want to use the API data in my app, I have to reference that data using another state hook, as demonstrated in this project.

I also learned about box shadows syntax properly & writing it accordingly.

box-shadow: h-offset v-offset blur spread color;

h-offset: Horizontal offset of the shadow. A positive value puts the shadow on the right side of the box, a negative value puts the shadow on the left side of the box - Required

v-offset: Vertical offset of the shadow. A positive value puts the shadow below the box, a negative value puts the shadow above the box - Required

blur: Blur radius (The higher the number, the more blurred the shadow will be) - Optional

color: Color of the shadow - Optional

spread: Spread radius. A positive value increases the size of the shadow, a negative value decreases the size of the shadow - Optional

inset: Changes the shadow from an outer shadow to an inner shadow - Optional

.btn {
	background-color: var(--clr-neongreen);
	border: none;
	width: 50px;
	height: 50px;
	border-radius: 60%;
	position: relative;
	margin-top: 20px;
	transition: all 0.5s ease-in-out;
}

.btn:hover {
	cursor: pointer;
	color: var(--clr-neongreen);
	box-shadow: 0px 0px 30px 8px var(--clr-neongreen);
}

Available Scripts

This project was bootstrapped with Create React App.

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

Useful resources

Author

Acknowledgments

I am very grateful to Smug & Openwell for always making time out of their busy schedules to see to my coding challenges and providing me with extra motivation.

advice-generator-app's People

Contributors

samuel-adu avatar soji-opa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.