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
Fancy Web Components with Stencil
Search
Vitalii Bobrov
November 30, 2017
Programming
0
92
Fancy Web Components with Stencil
Vitalii Bobrov
November 30, 2017
Tweet
Share
More Decks by Vitalii Bobrov
See All by Vitalii Bobrov
Listen to UI: Making Apps Accessible
bobrov1989
0
81
The Future of Audio Processing in the Web
bobrov1989
0
190
Job Behind the Scene: Web Worker
bobrov1989
0
170
Running in Parallel: WebAssembly, Web Workers and Worklets
bobrov1989
0
290
Algorithms and Their Habitat
bobrov1989
0
220
WebAssembly-driven CSS
bobrov1989
2
220
Angular State Management with NgRx Workshop
bobrov1989
0
160
The Man who Sold the Amp: How to Process Music with JS
bobrov1989
1
380
No Apollogies: Making Apps Accessible
bobrov1989
1
250
Other Decks in Programming
See All in Programming
Architectural Extensions
denyspoltorak
0
290
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.9k
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
180
AI & Enginnering
codelynx
0
110
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
Fragmented Architectures
denyspoltorak
0
160
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
Featured
See All Featured
Music & Morning Musume
bryan
47
7.1k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
66
Typedesign – Prime Four
hannesfritz
42
2.9k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
62
The Spectacular Lies of Maps
axbom
PRO
1
520
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
94
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Six Lessons from altMBA
skipperchong
29
4.1k
Exploring anti-patterns in Rails
aemeredith
2
250
Transcript
FANCY WEB COMPONENTS WITH
VITALII BOBROV JAVASCRIPT DEV @ LUXOFT @bobrov1989 vitaliy-bobrov.github.io
STENCIL IS A COMPILER THAT GENERATES WEB COMPONENTS ” “
WHAT IS STENCIL?
IT IS NOT A FRAMEWORK
CONSISTS OF 4 API WHAT IS WEB COMPONENTS? • JavaScript
Modules • Custom Elements • HTML Template • Shadow DOM
FRAMEWORKS WEB COMPONENTS SKATEJS
BROWSERS SUPPORT Chrome (blink-based) Safari Firefox Edge IE JS modules
(optional) ☹ Custom Elements ☹ ☹ HTML Template ☹ Shadow DOM ☹ ☹
FOR OLD BROWSERS USE POLYFILL
WHY WE SHOULD USE WEB COMPONENTS?
RE-USABLE COMPONENTS ALL WE WANT
COMPONENTS THAT NOT RELY ON ANY FRAMEWORK BUT PLATFORM ”
“ AND FRAMEWORK AGNOSTIC
AWESOME ALL MODERN FRAMEWORKS
STENCIL COMBINES THE BEST CONCEPTS OF THE MOST POPULAR FRAMEWORKS
INTO A SIMPLE BUILD-TIME TOOL ” “ JUST USE ALL THE BEST
KEY FEATURES • Virtual DOM • Async rendering (inspired by
React Fiber) • Reactive data-binding • TypeScript • JSX • Server Side Rendering (SSR)
FIBER VS STENCIL DEMO https://claudiopro.github.io/react-fiber-vs-stack-demo/fiber.html https://stencil-fiber-demo.firebaseapp.com/perf.html
WE ARE ENTERING NO FRAMEWORK ERA ” “
HOW TO GET STARTED?
BASIC COMPONENT import { Component, Prop } from '@stencil/core'; @Component({
tag: 'my-name', styleUrl: 'my-name.scss' }) export class MyName { @Prop() first: string; @Prop() last: string; render() { return ( <div> Hello, my name is {this.first} {this.last} </div> ); } }
API REVIEW
DECORATORS • @Component • @Prop • @State • @Method •
@Element • @Event • @Listen
LIFE CYCLE HOOKS • componentWillLoad • componentDidLoad • componentWillUpdate •
componentDidUpdate • componentDidUnload
PROPERTY HOOKS • @PropWillChange • @PropDidChange
DEMO TIME https://github.com/vitaliy-bobrov/stencil-meetjs-demo
QUESTIONS?
THANK YOU! USE THE PLATFORM ” “