Why components are the building blocks
📖 Scenario: You are creating a simple Svelte app to understand how components help build user interfaces by breaking them into smaller parts.
🎯 Goal: Build a Svelte app with a main component and a child component that displays a greeting message. Learn how components work together as building blocks.
📋 What You'll Learn
Create a main Svelte component file named
App.svelteCreate a child component file named
Greeting.sveltePass a
name prop from App.svelte to Greeting.svelteDisplay the greeting message inside
Greeting.svelteUse component import and usage syntax correctly
💡 Why This Matters
🌍 Real World
Web apps use components to build complex interfaces by combining small, manageable parts.
💼 Career
Understanding components is essential for frontend development jobs using modern frameworks like Svelte, React, or Vue.
Progress0 / 4 steps