ARTICLE

Svelte REPL, Part 1

From Svelte and Sapper in Action by Mark Volkmann

Manning Publications
CodeX
Published in
7 min readNov 17, 2021

--

This article delves into the Svelte REPL.

Take 40% off Svelte and Sapper in Action by entering fccvolkmann into the discount code box at checkout at manning.com.

Svelte REPL

REPLs exist for many programming languages. A REPL reads the code you enter, evaluates it (possibly compiling and reporting errors), prints the result of the code, and loops to allow repeating this process.

Svelte provides a browser-based REPL that supports defining Svelte components, seeing their rendered output, and more. Using the REPL is the easiest way to experiment with Svelte. It allows creating Svelte applications without having to download or install anything. Your first Svelte application is a click away!

To get started, browse the Svelte main website at https://svelte.dev/. Then click “REPL” near the upper-right of the page.

Code for a “hello world” app is provided by default. Modify this code to experiment various features of Svelte.

Figure 1. REPL initial screen

Experimenting is one use of the REPL; another is creating an ever-growing collection of examples you can draw from as you learn about Svelte. You’re highly encouraged to take advantage of this…

--

--

Manning Publications
CodeX
Writer for

Follow Manning Publications on Medium for free content and exclusive discounts.