2
3 Comments

Simple React Shopping Cart

Hi, it's me again!

For those who are still learning stuff about React (just like me :P), I wanted to share a Shopping Cart example using React Hooks and Context API.

Please, know that this is just an example with basic Shopping Cart functions and not a fully "Store" boilerplate.

Any feedback is appreciated and I hope some of you find this usefull for learning!

You can find the repo on the DEMO.

LINK: https://react-shooping-cart.netlify.app

Follow me on Twitter to share more coding stuff.

Thank you!

posted to Icon for group Learning to Code
Learning to Code
on May 14, 2020
  1. 2

    just wondering, why not use redux?

    1. 1

      This can be done with Redux without problems. But I wanted to share an example using Context API and React Hook.

  2. 1

    hello I have a problem with Countitems it start count form 1 on the first time but and then the secode time it count 2....
    can u tell me?

Trending on Indie Hackers
Your SaaS Isn’t Failing — Your Copy Is. User Avatar 61 comments Solo SaaS Founders Don’t Need More Hours....They Need This User Avatar 49 comments Planning to raise User Avatar 18 comments No Install, No Cost, Just Code User Avatar 15 comments The Future of Automation: Why Agents + Frontend Matter More Than Workflow Automation User Avatar 13 comments AI Turned My $0 Idea into $10K/Month in 45 Days – No Code, Just This One Trick User Avatar 13 comments