@schematichq/schematic-react 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,34 @@
1
+ import { default as React_2 } from 'react';
2
+ import { ReactNode } from 'react';
3
+ import * as SchematicJS from '@schematichq/schematic-js';
4
+
5
+ declare interface SchematicContextProps {
6
+ client?: SchematicJS.Schematic;
7
+ flagValues: Record<string, boolean>;
8
+ }
9
+
10
+ export declare interface SchematicFlags {
11
+ [key: string]: boolean;
12
+ }
13
+
14
+ export declare const SchematicProvider: React_2.FC<SchematicProviderProps>;
15
+
16
+ declare interface SchematicProviderProps {
17
+ children: ReactNode;
18
+ publishableKey?: string;
19
+ }
20
+
21
+ export declare const useSchematic: () => SchematicContextProps;
22
+
23
+ export declare const useSchematicContext: () => {
24
+ setContext: ((context: SchematicJS.SchematicContext) => Promise<void>) | undefined;
25
+ };
26
+
27
+ export declare const useSchematicEvents: () => {
28
+ track: ((body: SchematicJS.EventBodyTrack) => void) | undefined;
29
+ identify: ((body: SchematicJS.EventBodyIdentify) => void) | undefined;
30
+ };
31
+
32
+ export declare const useSchematicFlag: (key: string, fallback?: boolean) => boolean;
33
+
34
+ export { }