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
88
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
72
The Future of Audio Processing in the Web
bobrov1989
0
180
Job Behind the Scene: Web Worker
bobrov1989
0
140
Running in Parallel: WebAssembly, Web Workers and Worklets
bobrov1989
0
270
Algorithms and Their Habitat
bobrov1989
0
200
WebAssembly-driven CSS
bobrov1989
2
210
Angular State Management with NgRx Workshop
bobrov1989
0
150
The Man who Sold the Amp: How to Process Music with JS
bobrov1989
1
360
No Apollogies: Making Apps Accessible
bobrov1989
1
240
Other Decks in Programming
See All in Programming
NIKKEI Tech Talk#38
cipepser
0
250
デミカツ切り抜きで面倒くさいことはPythonにやらせよう
aokswork3
0
260
AI駆動で0→1をやって見えた光と伸びしろ
passion0102
1
850
pnpm に provenance のダウングレード を検出する PR を出してみた
ryo_manba
1
160
Foundation Modelsを実装日本語学習アプリを作ってみた!
hypebeans
0
130
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.5k
釣り地図SNSにおける有料機能の実装
nokonoko1203
0
200
Reactive Thinking with Signals and the Resource API
manfredsteyer
PRO
0
110
Android16 Migration Stories ~Building a Pattern for Android OS upgrades~
reoandroider
0
140
Pythonに漸進的に型をつける
nealle
1
130
チームの境界をブチ抜いていけ
tokai235
0
230
SODA - FACT BOOK(JP)
sodainc
1
8.8k
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
22k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Practical Orchestrator
shlominoach
190
11k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Building a Modern Day E-commerce SEO Strategy
aleyda
44
7.8k
Building an army of robots
kneath
305
46k
Making Projects Easy
brettharned
120
6.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
190
55k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
116
20k
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 ” “