If you want to get started with React this is a good place to begin! This is a simple React ecommerce example to show you how React seamlessly integrates with Snipcart and DatoCMS, providing quickest way to get your ecommerce started.
Installing this template will:
This template is explained in details in the related blog post. Follow the instructions to build it from scratch and delve deeper in how a React ecommerce is built.
You can see how it looks live on this demo installation.
If you want to set up a live demo for yourself, just sign up for a free DatoCMS account and click this button:
To run this project locally, install the dependencies of this project:
Add an .env
file containing the read-only API token of your DatoCMS site (set up with the demo button above):
echo 'REACT_APP_DATO_API_READONLY_TOKEN=abc123' >> .env
Then, to run this website in development mode (with live-reload):
npm run start
To build the final, production ready static website:
npm run build
The final result will be saved in the public
directory.