session by Jörn (@NarigoDF)
Basically a run through the Sapper template and a few key concepts of Svelte.
Svelte is a compiler for components/declarative coding and does not need a virtual dom anymore since the compiler creates the necessary means to manipulate the dom directly.
- Use
npx degit
to get the SAPPER template by shallow cloning a git repository - Install all packages with
npm i
- Checked
package.json
scripts:dev
for live reloading,test
for cypress testing,export
for creating a static site src/routes/\_layout.svelte
containing the base layout and gettingsegment
variable injected as prop.- Actually
export let myProp
in scripts are like React props - Using
<slot></slot>
to add children - CSS styles are scoped by default