Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
89
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
75
The Future of Audio Processing in the Web
bobrov1989
0
180
Job Behind the Scene: Web Worker
bobrov1989
0
150
Running in Parallel: WebAssembly, Web Workers and Worklets
bobrov1989
0
270
Algorithms and Their Habitat
bobrov1989
0
210
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
370
No Apollogies: Making Apps Accessible
bobrov1989
1
240
Other Decks in Programming
See All in Programming
開発に寄りそう自動テストの実現
goyoki
1
510
AI時代もSEOを頑張っている話
shirahama_x
0
240
Google Antigravity and Vibe Coding: Agentic Development Guide
mickey_kubo
2
140
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
matsu_chara
1
210
AIコーディングエージェント(Manus)
kondai24
0
130
配送計画の均等化機能を提供する取り組みについて(⽩⾦鉱業 Meetup Vol.21@六本⽊(数理最適化編))
izu_nori
0
130
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.2k
sbt 2
xuwei_k
0
200
AWS CDKの推しポイントN選
akihisaikeda
1
240
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
420
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
270
CSC305 Lecture 17
javiergs
PRO
0
280
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
50
14k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
82
Designing Experiences People Love
moore
142
24k
Faster Mobile Websites
deanohume
310
31k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
Agile that works and the tools we love
rasmusluckow
331
21k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Navigating Team Friction
lara
191
16k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Being A Developer After 40
akosma
91
590k
A Tale of Four Properties
chriscoyier
162
23k
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 ” “