React
schematic-react
is a client-side React library for Schematic which provides hooks to track events, check flags, and more. schematic-react
provides the same capabilities as schematic-js, for React apps.
Install
Usage
You can use the SchematicProvider
to wrap your application and provide the Schematic instance to all components:
To set the user context for events and flag checks, you can use the identify
function provided by the useSchematicEvents
hook:
Once you’ve set the context with identify
, you can track events:
To check a flag, you can use the useSchematicFlags
hook:
License
MIT
Support
Need help? Please open a GitHub issue or reach out to support@schematichq.com and we’ll be happy to assist.