Skip to content

[Feature] Implement debounced auto-save for resume form inputs #61

@knoxiboy

Description

@knoxiboy

Problem

The application currently triggers a direct localStorage write on every single keystroke. This causes excessive write cycles and performance lag in React rendering loops, especially when editing rich content areas.

Expected Behavior

Implement a custom debounce hook (useDebounce) so that localStorage sync triggers only after the user pauses typing for 500ms.

Target Files

  • src/app/resume-builder/page.tsx
  • Create a new hook in src/app/lib/hooks.ts or src/app/lib/useDebounce.ts

Suggested Steps

  1. Create a useDebounce hook that wraps the saving state.
  2. Modify the input handlers in the resume builder to update local state immediately (for visual responsiveness) but delay the serialization/storage routine until the debounce delay finishes.
  3. Test by logging saves in dev mode to confirm it registers only one write per pause.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions