diff --git a/src/content/archives/what-is-svelte.md b/src/content/archives/what-is-svelte.md new file mode 100644 index 0000000..101b196 --- /dev/null +++ b/src/content/archives/what-is-svelte.md @@ -0,0 +1,133 @@ +**What is Svelte?** +Svelte is a front-end technology similar in use to React, Vue, Angular, and the like. However, instead of loading a framework on the client-side, Svelte wires everything up during the build step, meaning it doesn't have to interpret any additional information at runtime. However, it's still in its relative infancy. + +**When should you use Svelte?** + +- If you want to try out a framework that builds into an app, rather one that uses a framework at runtime. +- If you feel like React, Vue, Angular, etc. might be too "heavy". +- If you like trying new things. + +**When should you not use Svelte?** + +- If you need an extremely battle-tested, extremely community supported framework. +- If you don't need interactivity/data binding. + +**Examples** +Styling a component: + +```html + + +

Styled!

+``` + +https://svelte.dev/examples#styling + +Bound Text Input: + +```js + + + +

Hello {name || 'stranger'}!

+``` + +https://svelte.dev/examples#text-inputs + +Reactive statement on a button: + +```js + + + +``` + +https://svelte.dev/examples#reactive-statements + +CSS class bindings: + +```html + + + + + + + + + +``` + +https://svelte.dev/examples#classes + +Built-in animation transitions: + +```html + + + + +{#if visible} +

+ Flies in, fades out +

+{/if} +``` + +https://svelte.dev/examples#in-and-out + +**Other resources** + +- https://svelte.dev/ +- https://svelte.dev/tutorial/basics +- https://egghead.io/playlists/getting-started-with-svelte-3-05a8541a +- https://github.com/sveltejs/svelte +- https://github.com/sveltejs/svelte/wiki/FAQ +- https://snipcart.com/blog/svelte-js-framework-tutorial +- https://blog.logrocket.com/how-to-build-a-simple-svelte-js-app/ +- https://alligator.io/svelte/getting-started-with-svelte/ +- https://codeburst.io/svelte-comparison-with-other-frameworks-e895c45567de