notrab / react-use-cart

React hook library for managing cart state

Home Page:http://npm.im/react-use-cart

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Gatsby example

notrab opened this issue · comments

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

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?

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?

Created #52 for consideration 🙏