Skip to content

temidayo-falomo/burger-a

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Burger-A

A web app that allows users to build their custom Burger & Mimic Checkout.

Installation

Install my-project with npm

  npm install my-project
  cd my-project

Demo

https://burger-a.netlify.app/make-burger

Support

For support, email [email protected] or send a message on Twitter.

Documentation

  • Created States for the individual ingridients(which was a bit stressful) e.g const [mayoCount, setMayoCount] = useState(2);

  • Created an object containing each ingridient and the current amount the user has added, which is by default = 0. E.g const burger = { mayo: 0, salad: 0, cutlet: 0, };

  • Now, for the best part, i'm using a very Intuitive(i must say) spread syntax technique i discovered to repeat a particular Ingredient based on the current count e.g {[...Array(burger.mayo + mayoCount)].map((index) => { return (img src=IMAGEURL />); })}

Helpful Links:

How to use ...Array(n) (https://simplernerd.com/jsx-repeat-n-times/)

Hooks

useState

useEffect

useContext

Acknowledgements

License

MIT

About

A web app that allows users to build their custom Burger & Mimic Checkout.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published