Skip to content

contentful/react-starter

Get Started with React and Contentful

Quick Start

Step 1. Get the source code and install dependencies

Clone this repository

git clone https://github.com/contentful/react-starter.git

Install dependencies.

npm install

Step 2. Create an environment file

  1. Rename the .env.example at the root of your project to .env (so it will be ignored by Git)
  2. Find your Contentful Space ID, your Content Delivery API access token, and Content Management API access token
  3. In the new .env file, replace YOUR_SPACE_ID, YOUR_DELIVERY_TOKEN and YOUR_MANAGEMENT_ACCESS_TOKEN with the correct values.

Step 3. Import our content model

The project comes with a Contentful set up command that imports the required content model and adds sample content to your space.

Run the following command to import the content model.

npm run setup

Step 4. Run the project locally

npm start

Open http://localhost:1234 to view it in your browser.

The page will reload when you make changes.

Available Scripts

This project uses Parcel. In the project directory, you can run:

npm start

Runs the app in the development mode.

npm run build

Builds the app for production to the dist folder.

About

Starter template to get started with Contentful and React

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •