Initialize Cord

Get Cord up and running in the browser

Now that you've got the Cord SDK installed, the next step is to initialize Cord in your page. For React applications, this means adding the <CordProvider /> component.

Initialize Cord

We recommend you wrap the root of your application with the <CordProvider />. This way you can use Cord components anywhere in your application.

// In your create-react-app project, you can replace src/App.js with
// the following:
import { CordProvider } from "@cord-sdk/react";

function App() {

  // TODO: This is a sample token that will expire in 24h. To implement Cord
  // fully, you need to generate tokens in your backend and send them to the
  // client.
  //   See and
  // for more information.
  return (
    <CordProvider clientAuthToken="<CLIENT_AUTH_TOKEN>">
      <div style={{ flex: 1 }}>
        <div style={{ margin: '0 auto', maxWidth: '500px' }}>
          <header style={{
            display: 'flex',
            justifyContent: 'space-between',
            alignItems: 'center'
            <h1>Hello World!</h1>
          <p>Let's get Cord-y!</p>

export default App;

Check that the SDK is initialized

In the developer console of your browser, run the following code:


If everything is working as expected, you should see output that looks something like this:

Chrome developer console output of an access token