Video: Custom Snipcart Hook

Ecommerce on the Jamstack with Snipcart, Next.js, & WordPress

16 videos

Released: 2021-07-31

User avatar

Instructor

Colby Fayock
AutoPlay

Custom Snipcart Hook

We were able to successfully get Snipcart up and running on our original app, but as we might have noticed, we lose some of the functionality as we navigate between our new dynamic pages due to the clientside route changes. To solve this, we're going to learn how to create a custom React hook that we can use globally with the Context API that allows us to tap into Snipcart's state directly in order to make sure we're always displaying accurate and up-to-date order details.