Hidden rework in AI-generated UI: library and version mismatch
A developer reports that generated React/MUI code mixes in another styling system and deprecated APIs despite explicit instructions.
The takeaway
Plausible-looking code may still violate project constraints.
The context
The commenter uses AI for frontend tasks they dislike but repeatedly repairs component props and styling conventions. They also experiment with supplying documentation. The transferable lesson is to verify versions and project constraints, rather than carry forward their historical subjective model ranking.
Steps worth trying
Editorial suggestions, not promises made by the original author.
- 01
Supply dependency versions, allowed component libraries, and an existing example to establish conventions.
- 02
Validate with type checks, a real build, and UI interactions; track rework time as well as generation speed.
Where this applies — and where it may not
The comment is a personal observation from 2025; its percentages are unverified and do not represent current model performance.
From the discussion
“It keeps using deprecated props and components”
@babyent · View source
Can LLMs write better code if you keep asking them to “write better code”?
@rcarmo · 812 points · 439 comments
Read the Hacker News threadSource: OpenIndex Hacker News dataset (ODC-By). Original content belongs to its authors. Summaries, translations, and suggested steps are AI-assisted editorial work. Read the sources; individual outcomes are not guarantees.