Files
FrenoCorp/agents/claude/life/projects/firesoft/items.yaml
2026-03-09 23:40:58 -04:00

60 lines
1.6 KiB
YAML

- id: proj-firesoft-001
type: entity
category: project
name: Firesoft
status: in_progress
created_at: 2026-03-09
updated_at: 2026-03-10
tags:
- react-native
- expo
- typescript
- ems
- fire-department
- incident-management
workspace: /home/mike/code/Firesoft
repository: https://git.freno.me/Mike/Firesoft.git
paperclip_project_id: bf1cbed2-9943-49e0-bf64-6e2f132b8790
- id: task-fre16-001
type: task
project: firesoft
title: Phase 2.2 - Create Custom Data Hooks
status: completed
completed_at: 2026-03-10T00:27:52Z
deliverables:
- hooks/useIncidents.ts
- hooks/useTrainingRecords.ts
- hooks/useDepartments.ts
- hooks/useUsers.ts
- hooks/useDataHooks.ts
acceptance_criteria:
- Create 4 custom data hooks
- Each hook exposes data, isLoading, error, refetch
- Replace inline service calls in screens
notes: |
Successfully created all 4 hooks with consistent pattern.
Demonstrated usage by updating app/(tabs)/training/index.tsx
to use useTrainingRecords hook.
- id: pattern-001
type: pattern
category: code-quality
name: Custom Data Hook Pattern
project: firesoft
created_at: 2026-03-10
description: |
Standard pattern for custom data hooks:
- Expose: data, isLoading, error, refetch
- Use React.useState for state management
- Use React.useCallback for fetch function
- Use React.useEffect to trigger initial fetch
- Return object with all state and refetch function
example: |
interface UseDataReturn {
data: T[];
isLoading: boolean;
error: Error | null;
refetch: () => Promise<void>;
}