This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { and, eq, isUndefined, not, useLiveQuery } from '@tanstack/react-db' | |
| import { useMemo } from 'react' | |
| import { installerDispatchCollection, installerDispatchVehicleDispatchCollection, vehicleDispatchCollection } from '@/db/dispatch' | |
| const finalize = (set: Set<string>) => (set.size ? Array.from(set).sort().join(',') : '') | |
| export const useInstallerAssignedIds = (installerId: string, dateString: string) => { | |
| const { data } = useLiveQuery( | |
| q => | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Rule: Implement @tanstack/react-form | |
| Description: This rule guides the AI on how to implement forms in React using the `@tanstack/react-form` library, following best practices for common use cases. It covers setup, field creation, validation (sync, async, schema-based), state management, array fields, and submission handling. | |
| Applies to: *.tsx | |
| --- | |
| ## @tanstack/react-form Implementation Guide | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import React, { useState } from 'react'; | |
| import { | |
| View, | |
| Text, | |
| TextInput, | |
| TouchableHighlight, | |
| Keyboard, | |
| Modal, | |
| ActionSheetIOS, | |
| Animated, |