Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
バックエンドエンジニアが行うSvelte + Vite なフロントエンド構築
Search
shiro seike
PRO
November 19, 2022
Technology
1.8k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
バックエンドエンジニアが行うSvelte + Vite なフロントエンド構築
shiro seike
PRO
November 19, 2022
More Decks by shiro seike
See All by shiro seike
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
570
コミュニティの有益性 ~JAWS Days 2026 での体験を通して~ / The Benefits of a Community ~Through My Experience at JAWS Days 2026~
seike460
PRO
0
420
Architecture as SteeringOn-Ramp to AI-DLC
seike460
PRO
0
46
Why Continue AWS Community Builders
seike460
PRO
0
85
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
200
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
310
AI-DLC 入門 〜AIコーディングの本質は「コード」ではなく「構造」〜 / Introduction to AI-DLC: The Essence of AI Coding Is Not “Code” but “Structure”
seike460
PRO
0
2k
今さら聞けないサーバーレスのいいところ 〜運用から解放される世界を目指して〜 / The Benefits of Serverless You Might Be Too Embarrassed to Ask About Now — Aiming for a World Free from Operational Burdens
seike460
PRO
0
120
AWS Lambda Durable Functions のユースケースを探る / Exploring Use Cases for AWS Lambda Durable Functions
seike460
PRO
0
110
Other Decks in Technology
See All in Technology
ボトムアップ文化が強い組織で セキュリティをどう根付かせていくかの現在進行形の話 / Making Security Stick in a Bottom-Up Organization
yamaguchitk333
0
250
ホームラボ紹介
y_sera15
0
210
TypeScript入門 2026
recruitengineers
PRO
3
700
AWS ネットワーク構築でハマった(ハマりかけた) 5選とそこから得た教訓
nagisa53
4
280
少人数チームで実現する、大規模AWSサーバーレス基盤における"揺らがない"信頼性運用
maimyyym
1
110
老害フォレンジッカーはAI羊の夢を見るか?
tadmaddad
0
350
その“隠したつもり”が命取り ── 自前と平文をやめて「正解」に委ねる
kuroneko13
0
130
Goでデータパイプラインを作ろう
sansantech
PRO
1
510
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
17
7.6k
Head First モブプログラミング / Head First Mobprogramming
takaking22
10
12k
AI-DLC実践録_フルサイクル開発への挑戦
miyuc
0
260
自宅NWにISR4331を導入してみた話
okaits
0
110
Featured
See All Featured
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
530
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
440
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1.1k
sira's awesome portfolio website redesign presentation
elsirapls
0
330
Building Applications with DynamoDB
mza
96
7.2k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
Bash Introduction
62gerente
615
220k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
210
The Curse of the Amulet
leimatthew05
2
14k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Transcript
バ ド ジ が Svelte + Vite ド 2022
2 0 22 . 11 . 19 @seike 4 60 1
@seike 460 - - @seike 46 0 - Fusic -
/ - / / - - PHP - PHP - PHPerKaigi - JAWS Days - AWS Dev Day 2
Agenda 1 .Svelte + Vite 2 .Svelte 3 .Svelte 4
.Vite 5 .Vite 6 . 3
01 Svelte + Vite
5
6
Svelte + Vite + Tailwind CSS 7
02 Svelte
Svelte JavaScript Vite Svelte Svelte Write less code No
virtual DOM DOM Truly reactive Hooks 9
Write less code - React 10 import React, { useState
} from 'react'; export default () => { const [a, setA] = useState( 1 ); const [b, setB] = useState( 2 ); function handleChangeA(event) { setA(+event.target.value); } function handleChangeB(event) { setB(+event.target.value); } return ( <div> <input type="number" value={a} onChange={handleChangeA}/> <input type="number" value={b} onChange={handleChangeB}/> <p>{a} + {b} = {a + b}</p> </div> ); }; UI React State Hook State State input State UI
Write less code - Svelte 11 <script> let a =
1 ; let b = 2 ; </script> <input type="number" bind:value={a}> <input type="number" bind:value={b}> <p>{a} + {b} = {a + b}</p> Svelte let State bind 築 [a] input p [a]
Write less code + Truly reactive 12 <script> let a
= 1 ; let b = 2 ; </script> <input type="number" bind:value={a}> <input type="number" bind:value={b}> <p>{a} + {b} = {a + b}</p> Svelte
TEMPLATE SYNTAX 13 {#if porridge.temperature > 1 00 } <p>too
hot!</p> {:else if 8 0 > porridge.temperature} <p>too cold!</p> {:else} <p>just right!</p> {/if} {#each items as item} <li>{item.name} x {item.qty}</li> {/each} {#await promise} <p>waiting for the promise to resolve...</p> {:then value} <p>The value is {value}</p> {:catch error} <p>Something went wrong: {error.message}</p> {/await} {#key value} <div transition:fade>{value}</div> {/key} {#if }... {:else if } {/if} {#each as name, index} ... {/each} {#await }... {:then name}... {:catch name} … {/await} {#key }... {/key}
Props Props export Props 14 Counter.svelte App.svelte
$: $: JS 15
Store 16
Store React Redux Vue Vuex Store writable Store
subscribe update set Store 17
Context API Svelte ContextAPI setContext getContext hasContext getAllContexts context
context 18 Counter.svelte App.svelte
Context API 19 Counter.svelte App.svelte
Component Hooks onMount DOM beforeUpdate state afterUpdate onDestroy tick state
resolve promise 20
No virtual DOM Virtual DOM Dom Virtual DOM
Svelte DOM 21
krausest React Vue Svelte 22 https://krausest.github.io/js-framework-benchmark/current.html
03 Svelte
👍 HTML CSS Javascript 🙏 $: 24
Made With Svelte Svelte Society Example 25
SvelteKit … 26
04 Vite
Vite HMR Rollup 28
ES Modules - Bundle - import export - ES
Modules - 29 https://vitejs.dev/guide/why.html#slow-server-start
vite.config.js Vite vite.config.js Production Staging loadEnv
.env Svelte Import.meta.env. prefix VITE_ 30 vite.config.js Svelte
05 Vite
👍 32
Svelte + Vite
34
06
36 Svelte UI Point 1 Example Point 2 Vite 頻
Point 3 Point 4
Thank You We are Hiring ! https://recruit.fusic.co.jp/