@flavoai/fastfold
Version:
Zero-boilerplate backend for React apps with auto-generated CRUD and declarative security
54 lines • 1.54 kB
TypeScript
import React from 'react';
import { QueryClient } from '@tanstack/react-query';
/**
* Create a pre-configured QueryClient optimized for Fastfold
*/
export declare function createFastfoldQueryClient(options?: {
staleTime?: number;
gcTime?: number;
refetchOnWindowFocus?: boolean;
retry?: number;
retryDelay?: number;
}): QueryClient;
interface FastfoldProviderProps {
children: React.ReactNode;
queryClient?: QueryClient;
showDevtools?: boolean;
devtoolsOptions?: {
initialIsOpen?: boolean;
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
};
}
/**
* 🚀 FASTFOLD PROVIDER - Wrap your app with this to enable Fastfold hooks
*
* @example
* function App() {
* return (
* <FastfoldProvider>
* <YourApp />
* </FastfoldProvider>
* );
* }
*
* @example With custom configuration and devtools
* const queryClient = createFastfoldQueryClient({
* staleTime: 10 * 60 * 1000, // 10 minutes
* refetchOnWindowFocus: true
* });
*
* function App() {
* return (
* <FastfoldProvider
* queryClient={queryClient}
* showDevtools={true} // Opt-in to show devtools
* >
* <YourApp />
* </FastfoldProvider>
* );
* }
*/
export declare function FastfoldProvider({ children, queryClient, showDevtools, // Disabled by default
devtoolsOptions }: FastfoldProviderProps): import("react/jsx-runtime").JSX.Element;
export { useQueryClient } from '@tanstack/react-query';
//# sourceMappingURL=provider.d.ts.map