-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.tsx
More file actions
59 lines (53 loc) · 1.36 KB
/
index.tsx
File metadata and controls
59 lines (53 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
/**
* @objectstack/client-react
*
* React hooks for ObjectStack Client SDK
*
* Provides type-safe React hooks for:
* - Data queries (useQuery, useMutation, usePagination, useInfiniteQuery)
* - Metadata access (useObject, useView, useFields, useMetadata)
* - Client context (ObjectStackProvider, useClient)
*/
// Context & Provider
export {
ObjectStackProvider,
ObjectStackContext,
useClient,
type ObjectStackProviderProps
} from './context';
// Data Hooks
export {
useQuery,
useMutation,
usePagination,
useInfiniteQuery,
type UseQueryOptions,
type UseQueryResult,
type UseMutationOptions,
type UseMutationResult,
type UsePaginationOptions,
type UsePaginationResult,
type UseInfiniteQueryOptions,
type UseInfiniteQueryResult
} from './data-hooks';
// Metadata Hooks
export {
useObject,
useView,
useFields,
useMetadata,
type UseMetadataOptions,
type UseMetadataResult
} from './metadata-hooks';
// Realtime Event Hooks
export {
useMetadataSubscription,
useDataSubscription,
useMetadataSubscriptionCallback,
useDataSubscriptionCallback,
useRealtimeConnection,
useAutoRefresh
} from './realtime-hooks';
// Re-export ObjectStackClient and types from @objectstack/client
export { ObjectStackClient, type ClientConfig } from '@objectstack/client';