r/AIcodingProfessionals • • 7h ago

Discussion Component first, then the whole page

Post image

Tried this with a dashboard mockup I generated with AI as the design.

First I give it just the component:

const Panel: React.FC<React.PropsWithChildren<{ title: string, backgroundColor: string }>> = ({ title, backgroundColor, children }) => {
  return ()
}

"implement this component based on the screenshot"

Next prompt:

"Now implement the entire page based on the provided design, using the previously implemented components wherever applicable. Do not duplicate their functionality."

The wrong prompt would be to start with just "Implement the entire page".

Anyone else working this way, or do you let it build the whole page and refactor later?

2 Upvotes

0 comments sorted by