reactjsnext.jssnipcart

Snipcart - possible to make a custom cart using React?


I am making a Next website, and added Snipcart. The Snipcart UI embeds Vue, and has embedded images in it, and an external CSS file, which all in all add a ridiculous amount of time to my page load time. I also don't quite like the UI, but that's a more minor issue as it can be customized.

So I was thinking if instead I can incorporate the cart's actual logic into my own React UI, and avoid all of the extra loading time while fully controlling how the cart looks and reacts to events.

I looked around Snipcart's documentation and saw there's actually a REST API, however it seems to be only for getting existing orders/products and such, not quite helpful for an active session.

I wonder if anyone tried this, or if the Snipcart cart's code is open source and available somewhere (I couldn't find it on their github, but I might have missed it).

Thanks :)


Solution

  • That's not possible at the moment, I'm on the Snipcart team, and we have plans to make our JavaScript SDK available as a NPM package eventually so that customers will be able to do custom carts with the technology they like. But, we're a small bootstrapped team, so it's still in the works.

    But, we will soon be working on decreasing our footprint, we're aware that our bundle is large and could be optimized.