2

Sveltejs is a js framework based on compiling, sfcjs is a js component runtime in browser with svelte style syntax. This article will compare their syntax.

"hello world"

Alt Text

Dynamic attributes

Alt Text

styling

Alt Text

Nested component

Alt Text

Reactive assignments

Alt Text

Reactive declarations

Alt Text

Declaring props

If blocks

Alt Text

Loop blocks

Alt Text

Await blocks

DOM events

Component events

Two-way-binding

Reactive styling


否子戈
2.2k 声望143 粉丝

疯狂前端开发中……