Chapter 5: Component Interaction Concepts

Components are at the core of frontend frameworks like Svelte. They are the primary unit for organizing and implementing your view layer. Components encapsulate a specific UI and/or behavior—such as the look of a button, a list containing arbitrary elements, or a specific section of a page.

In the first half of this book, we focused on the ins and outs of one component. We looked at template syntax in Chapter 2, and at reactive statements in Chapter 3. In Chapter 4, we looked at Svelte stores, which provide a handy API for implementing state management and which do cross-component updates. There are, of course, more ways to integrate components with each other—and we’ll look into them in this tutorial. ...

Get Svelte: A Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.