Set Up Components
Components are simple to set up and maintain. Once you’ve integrated a component into your application, it will reflect up-to-date data for the given company that is accessing it in your application.
To set up components, you’ll need to do two things:
- Install the required libraries
- Generate a short-lived access token to make requests on behalf of a given company
- Embed the SchematicEmbed component in your React frontend using a Component ID from Schematic
All steps are covered below.
1. Install the required libraries
There are two libraries you’ll need to install:
2. Set up your server for token exchange
Schematic components use short-lived, company-scoped temporary access tokens to make requests on behalf of a company. You’ll need to issue these from your server, using a secret access token.
If you haven’t already done so, start by installing the Schematic developer SDK of your choosing. Then, you can implement the token exchange for a specific company using its keys:
Node.js
Go
Temporary access tokens are valid for 15 minutes.
3. Use the SchematicEmbed component in your React frontend application
Once you’ve issued a temporary access token and provided it to your frontend React application, you can simply pass it to the SchematicEmbed component along with your Component ID to render it:
Standalone components
Some components can be used standalone. If you’d like more customization options or just need a single component, you have the option to render it directly within our provider. The difference with this method is that you no longer need to generate an access token but instead simply provide your Schematic API key.