Extract a repeated UI component

A shared component preserving both views' appearance and behavior.

Jump to the prompt
THE RESULT

A shared component preserving both views' appearance and behavior.

READY-TO-USE PROMPT
Compare [FILE_A] and [FILE_B] in [REPO]. Extract genuinely shared UI into a small component with clear props for the differences. Check types and existing tests for the affected path. Show the diff and explain the duplication removed.

Paste into a conversation with LocalCommander. Replace bracketed fields with your own paths, files or URLs.

THE WORKFLOW

From your material to a result.

  1. 01

    Prepare the inputs: Repository and two similar views.

  2. 02

    Replace square-bracket placeholders with the actual names, paths or URL. Paste the prompt into a chat with LocalCommander connected.

  3. 03

    Verify the result: A shared component preserving both views' appearance and behavior. Ask for the saved file location or the evidence behind the findings.