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
What I learned from using Svelte for the demos
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Niklas Kiefer
March 17, 2020
Programming
1
220
What I learned from using Svelte for the demos
Modeling Lightning Talk ⚡️
Niklas Kiefer
March 17, 2020
Tweet
Share
More Decks by Niklas Kiefer
See All by Niklas Kiefer
Optimizing tidy: Practical Insights with the React Compiler
pinussilvestrus
0
8
a11y testing: tech talk
pinussilvestrus
0
5
Tech Talk: a11y testing at the HTO team
pinussilvestrus
0
47
a11y testing
pinussilvestrus
0
83
Taking Templates to the Limit
pinussilvestrus
0
51
What the $ref - Create composable JSON Schemas
pinussilvestrus
0
68
Automatic a11y testing with axe
pinussilvestrus
0
37
Roller coaster mining with Camunda Cloud
pinussilvestrus
0
22
How to break down
pinussilvestrus
0
53
Other Decks in Programming
See All in Programming
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
CSC307 Lecture 08
javiergs
PRO
0
670
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.5k
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
200
AI & Enginnering
codelynx
0
120
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
1
120
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
Oxlint JS plugins
kazupon
1
1k
並行開発のためのコードレビュー
miyukiw
0
1.1k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
610
Featured
See All Featured
It's Worth the Effort
3n
188
29k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
230
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
950
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
180
Raft: Consensus for Rubyists
vanstee
141
7.3k
The SEO Collaboration Effect
kristinabergwall1
0
350
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
390
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
120
Code Reviewing Like a Champion
maltzj
527
40k
Transcript
What I learned from using Svelte for the demos Modeling
Lightning Talk ⚡ Niklas Kiefer
2 Background: DRD Edit Demo
3 Background: DRD Edit Demo
4 New: Navigation + Table Layout Demo
5 New: Navigation + Table Layout Demo
6
7 Lessons Learned (1) Reactivity is - Part 1 <script>
export let view; export let activeView; </script> <div class="wrapper" style="display: {view === activeView ? 'block' : 'none'}"> {#if view === activeView} <slot/> {/if} </div>
8 Lessons Learned (2) Reactivity is - Part 2 <script>
export let tableData = {}; const HIT_POLICIES = [ /* ... */ ]; $: explanation = find( HIT_POLICIES, hp => hp.name === tableData.hitPolicy ).explanation; function changeHitPolicy(event) { const { target: { value } } = event; tableData.hitPolicy = value; } </script> <select on:change={changeHitPolicy}> {#each HIT_POLICIES as { name }} <option selected={name === tableData.hitPolicy}> {name} </option> {/each} </select> <p class="hp-explanation">{explanation}</p>
9 Lessons Learned (3) Component Templating <script> import Table from
'../../../decision-table-layout/src/components/Table.svelte'; import ArrowExpandSvg from '../../resources/arrow-expand.svg'; import './NavigationTable.scss'; const noop = () => {}; export let onViewSwitch = noop; export let tableData; </script> <div class="navigation-table"> <div class="buttons"> <span class="arrow-expand btn btn-sticky" on:click={() => onViewSwitch('split-screen')}> {@html ArrowExpandSvg} </span> <button class="edit-drd btn" on:click={() => onViewSwitch('drd')}> Edit DRD </button> </div> <Table { tableData } /> </div>
10 Lessons Learned (4) Global State <script> import data from
'../resources/data.js'; let currentTable = data['Decision_03absfl']; let view = 'drd'; </script> <Wrapper view="drd" activeView={view}> <DRD decision={currentTable.id} /> </Wrapper> <Wrapper view="split-screen" activeView={view}> <SplitScreen tableData={currentTable} /> </Wrapper>
11 Lessons Learned (5) Local Styles are equally good
12 Lessons Learned (6) Performance measures DRD Editing Demo Navigation
Demo
13 Summary Reactivity + State Management makes it way easier
to build quick demos with Svelte
Thank you