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
Architecture as SteeringOn-Ramp to AI-DLC
seike460
PRO
0
8
Why Continue AWS Community Builders
seike460
PRO
0
71
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
180
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
270
AI-DLC 入門 〜AIコーディングの本質は「コード」ではなく「構造」〜 / Introduction to AI-DLC: The Essence of AI Coding Is Not “Code” but “Structure”
seike460
PRO
0
1.3k
今さら聞けないサーバーレスのいいところ 〜運用から解放される世界を目指して〜 / The Benefits of Serverless You Might Be Too Embarrassed to Ask About Now — Aiming for a World Free from Operational Burdens
seike460
PRO
0
100
AWS Lambda Durable Functions のユースケースを探る / Exploring Use Cases for AWS Lambda Durable Functions
seike460
PRO
0
92
歴史から学ぶ「Why PHP?」 PHPを書く理由を改めて理解する / Learning from History: “Why PHP?” Rediscovering the Reasons for Writing PHP
seike460
PRO
0
510
Team-First Serverless Platform Engineering Approach to PHP Applications with Laravel and Bref
seike460
PRO
1
160
Other Decks in Technology
See All in Technology
手塩にかけりゃいいってもんじゃない
ming_ayami
0
360
Dario Amodi『Policy on the AI Exponential』を理解する
nagatsu
0
220
2026TECHFRESH畢業分享會 - Lightning Talk - 資料也要 CI/CD? 用 Airbyte 自動化資料同步
line_developers_tw
PRO
0
780
AmazonRoute 53ではじめてのドメイン取得!HTTPS化までの道のりを整理してみた
usanchuu
3
130
"何を作るか"を任される エンジニアは、どう育つのか
yutaokafuji
1
600
現地で盛り上がった WWDC26 Keynote
zozotech
PRO
1
200
やさしいA2A入門
minorun365
PRO
12
1.7k
爆速でマルチプロダクトを立ち上げる時 事業・CTO目線で大事にしたい事
miyatakoji
0
100
On-behalf-of Token exchange with AgentCore Identity
hironobuiga
2
150
【Cyber-sec+】経営層を"動かす"ための考え方
hssh2_bin
0
130
2026TECHFRESH畢業分享會 - Lightning Talk - E起 See See : 電商推薦讀心術? 數據說了算
line_developers_tw
PRO
0
780
非定型業務をAI slackbotで自動化する ~ 社内要望を自動壁打ちするbotを作った ~/automating-ad-hoc-work-with-ai-slackbot
shibayu36
0
600
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
250
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
How to Ace a Technical Interview
jacobian
281
24k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
430
Facilitating Awesome Meetings
lara
57
7k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
180
Context Engineering - Making Every Token Count
addyosmani
9
960
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
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/