Back to Discover
🚤 Lovable Prompt Library example - Refactoring Component
Example from Lovable's library for refactoring a specific component file for clarity and maintainability, keeping behavior and UI identical., provided under the MIT license
Prompt
Refactor the ProjectList component file, but keep its behavior and UI exactly the same.
Goals:
- Improve the code structure and readability (simplify complex functions, break into smaller ones if needed).
- Remove any unused variables or imports.
- Ensure the file follows best practices and is well-documented.
Do not introduce any new features or change how the component works for the user – this is purely a code cleanup for maintainability. If any part of the code is unclear, add a brief comment for clarification.