UNPKG

@dev-fastn-ai/react-core

Version:

React hooks and components for integrating Fastn AI connector marketplace into your applications. Built on top of @fastn-ai/core with React Query for optimal performance.

78 lines (65 loc) 2.69 kB
# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [1.0.0] - 2024-01-XX ### Added - Initial release of @fastn-ai/react-core - React hooks and components for Fastn AI integration - Built on top of @fastn-ai/core with React Query - FastnProvider for React application setup - useConnectors hook for fetching marketplace connectors - useConfigurations hook for managing connector configurations - useConfigurationForm hook for dynamic form handling - useFieldOptions hook for async select field options - Complete TypeScript support with full type exports - React Query integration for caching and performance - Comprehensive error handling and loading states - Optimistic updates and background refetching ### Features - `FastnProvider` component for application setup - `useConnectors()` hook with React Query caching - `useConfigurations()` hook for configuration management - `useConfigurationForm()` hook for form handling - `useFieldOptions()` hook for async select fields - Full TypeScript support with exported types - React Query integration for optimal performance - Error boundaries and loading state management ### Hooks - `useConnectors` - Fetch and manage marketplace connectors - `useConfigurations` - Handle connector configurations - `useConfigurationForm` - Manage dynamic configuration forms - `useFieldOptions` - Async select field options with search/pagination ### Components - `FastnProvider` - Main provider component with configuration - Context provider for Fastn client access - React Query provider integration ### Types - All types from @fastn-ai/core exported - React-specific type definitions - Hook return type definitions - Component prop type definitions ### Performance - React Query integration for intelligent caching - Background refetching and stale data management - Optimistic updates for better UX - Automatic retry on failure - Cache invalidation and garbage collection ### Developer Experience - Complete TypeScript support - Comprehensive documentation with examples - Error handling with custom error classes - Loading states and skeleton components - Best practices and troubleshooting guides --- ## [Unreleased] ### Planned - Additional React components for common UI patterns - Form validation integration - Advanced caching strategies - Real-time updates with WebSocket support - Performance optimizations - Additional hook utilities - Testing utilities and examples - Storybook integration - Advanced error recovery mechanisms