Skip to content
Advanced
refactor
components

Refactor into reusable components

Clean up after rapid building. Tuned for Lovable.

Prompt

Refactor [AREA OF APP] so repeated markup becomes reusable components. Keep behaviour and appearance identical. List each new component and where it is used.

Use the existing design system and keep the app working after each step.

Replace the [HIGHLIGHTED] parts with your own details.

Example output

A list of four extracted components and the screens that use them, with no visual change.

Tips

  • Ask for a list of changes so you can review them.

Related prompts