© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
A. LibbyPractical Sveltehttps://doi.org/10.1007/978-1-4842-7374-6_3

3. Managing State and Data

Alex Libby1  
(1)
BELPER, UK
 

So far, we’ve worked our way through constructing components for our site, but they are no good without one thing – data!

I’m sure someone once said “Content is king” – it doesn’t matter if this is product content, or the results of asking our customers for information such as product quantity, decent data is essential for any website.

Not only is producing accurate and valid data vital, we also need to manage it properly. It’s no good if we ask customers how many items they want to purchase, yet present completely inaccurate values or keep ...

Get Practical Svelte: Create Performant Applications with the Svelte Component Framework 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.