Fun with Svelte. Demonstrating concepts such as reactive declarations
, props
, event forwarding
, component bindings
, this binding
, slots
, and context api
.
Play around on the REPL.
npm install
npm run dev
<script>
import Starfield from './Starfield.svelte';
import Starship from './Starship.svelte';
</script>
<Starfield width="500" height="250">
<Starship posX="100" posY="150" />
<Starship shipClass="galaxy" posX="275" posY="50" />
</Starfield>