guides > javascript

React

Last updated Invalid Date

Using the Tipe React Starter

If you'd like to use React with Tipe, we've created a React Starter for you that's ready to go.

Download and config

Download the Tipe React Starter. At the command line, in the project directory, run npm install or yarn install.

Open the project with your favorite code editor and look at the lib/initApollo.js file.

Next, log into Tipe and retrieve your keys from the API Keys section of the dashboard. The API Keys icon is on the left sidebar.

API Keys Icon

In the API Keys section, you'll see your keys. The following image illustrates their location. They're blurred out here for security.

Secret Keys Location

Copy and paste the Org Secret into your .initApollo.js file next to Tipe-Id. Do the same with the Generated API key (the bottom one in the illustration), pasting it into the Authorization field.

javascript
      headers: {
        Authorization: 'ADD YOUR API KEY HERE', <-- add you API keys here
        'Tipe-Id': 'ADD YOUR ORG ID HERE'  <-- your Org Secret goes here
      }

After saving, go back to the command line and run npm run dev. Next, switch over to your browser and go to http://localhost:4000/.

For the latest on our React Starter, watch the repo on GitHub where we welcome contributions!