notrab / react-use-cart

React hook library for managing cart state
http://npm.im/react-use-cart
Apache License 2.0
367 stars 48 forks source link

Add Gatsby example #34

Closed notrab closed 3 years ago

notrab commented 4 years ago

We should add a Gatsby example that shows how to wrap Gatsby with CartProvider and make a few function calls.

spences10 commented 4 years ago

Just landed here from scrolling through all the open issues for Hacktoberfest @notrab! 😁

What does the example need to be?

I'm guessing the CartProvider needs to be high up in the component tree to be available to the rest of the project?

notrab commented 4 years ago

Hey @spences10

I am thinking that there could be an examples folder in the root directory, and each of the examples cover installing the CartProvider, as well as providing some basic functionality like https://github.com/notrab/react-use-cart#quick-start

What do you think?

spences10 commented 4 years ago

Created #52 for consideration 🙏