/** * useFeltDB - React hook for FeltDB integration * * This module provides React hooks for easily integrating FeltDB * into React applications with automatic state management. * * Usage: * ```jsx * import { useFeltDB } from './hooks/useFeltDB'; * * function UserList() { * const users = useFeltDB("users"); * * const addUser = (name, email) => { * users.insert(name, email); * }; * * return ( *
(Component: React.ComponentType
, dbPath: string): React.FC
; /** * Example component using useFeltDB * * @example * ```jsx * import { useFeltDB } from './hooks/useFeltDB'; * * function UserList({ db }) { * const { records, loading, error, insert } = useFeltDB(db, "users", { * refreshInterval: 5000, // Refresh every 5 seconds * }); * * if (loading) return