Setup the SDK
Integrate the Schematic SDK into your application
The schematic-react
SDK is a client-side React library for Schematic which provides hooks to track events, check flags, and more.
Install
Usage
SchematicProvider
Similar to libraries like Clerk, Use the SchematicProvider
to wrap your application and provide the Schematic instance to all components:
You can generate a publishable key from the Schematic Dashboard. These keys look like api_...
and are meant to be used client-side.
Identifying the user with Schematic
To set the user context for events and flag checks, you can use the identify
function provided by the useSchematicEvents
hook:
This call will upsert the company into Schematic, and set the context for the current session.
Check a flag
To check our flag, you can use the useSchematicFlag
hook:
Next Steps!
Congrats 🎉! Now you have the basics setup to start using Schematic.
If you’d like to dig deeper into our SDK and platform, here are a few places to start:
If you’d like to learn more about how Schematic can build and manage your pricing and billing, here are a few places to start:
- Building your pricing catalog
- Usage-based plans
- Per-company overrides
- Legacy plan management
- Trials
- Add-ons