This is an excerpt from Manning's book Svelte and Sapper in Action. Login to get full access to this book.
Top-level variables in the script element of a component define the state of the component. For example, the state of the component below includes the color and name variables.
script
color
name
Figure 3.3 Travel Packing login