Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Fancy Web Components with Stencil
Search
Vitalii Bobrov
November 30, 2017
Programming
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Fancy Web Components with Stencil
Vitalii Bobrov
November 30, 2017
More Decks by Vitalii Bobrov
See All by Vitalii Bobrov
Listen to UI: Making Apps Accessible
bobrov1989
0
120
The Future of Audio Processing in the Web
bobrov1989
0
250
Job Behind the Scene: Web Worker
bobrov1989
0
200
Running in Parallel: WebAssembly, Web Workers and Worklets
bobrov1989
0
340
Algorithms and Their Habitat
bobrov1989
0
260
WebAssembly-driven CSS
bobrov1989
2
250
Angular State Management with NgRx Workshop
bobrov1989
0
190
The Man who Sold the Amp: How to Process Music with JS
bobrov1989
1
430
No Apollogies: Making Apps Accessible
bobrov1989
1
290
Other Decks in Programming
See All in Programming
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
500
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
470
すこし踏み込む CancellationToken
htkym
2
940
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.9k
App Intentsのビルドプロセスを支える技術
kntkymt
0
430
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
310
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
570
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
180
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
390
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
440
Family mrubyの進捗
kishima
1
130
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
370
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
3.2k
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
520
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
Building AI with AI
inesmontani
PRO
1
1.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
390
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Being A Developer After 40
akosma
91
590k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
510
Making the Leap to Tech Lead
cromwellryan
135
10k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
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 ” “