Layouts provide a reusable page structure, while components encapsulate reusable UI pieces.
A layout may contain:
header
navigation
main content
footer
A component might represent:
button
alert
modal
product card
form field
Example component usage:
<x-product-card :product="$product" />
Scenario:
A SaaS dashboard may have one dashboard layout and dozens of reusable UI components. This reduces duplicated markup and makes UI changes safer.
0 comments:
Post a Comment
Thanks