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
Preact & Inferno
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Brian Holt
January 05, 2017
Programming
5
1.9k
Preact & Inferno
Given for SFJS
Brian Holt
January 05, 2017
Tweet
Share
More Decks by Brian Holt
See All by Brian Holt
Human React
btholt
3
1k
10 KB or Bust
btholt
0
410
10KB or Bust: The Delicate Power of Webpack and Babel
btholt
2
510
JS Next
btholt
10
1.6k
ES20XX
btholt
1
180
What's Coming After ES6
btholt
2
590
DPL Graduation, October 2016
btholt
1
190
Teaching with Empathy
btholt
5
950
ES6 + React
btholt
3
950
Other Decks in Programming
See All in Programming
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
160
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
520
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
470
CSC307 Lecture 13
javiergs
PRO
0
310
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
200
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
200
Event Storming
hschwentner
3
1.3k
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.4k
JPUG勉強会 OSSデータベースの内部構造を理解しよう
oga5
2
230
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
230
15年目のiOSアプリを1から作り直す技術
teakun
1
600
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
550
Featured
See All Featured
Everyday Curiosity
cassininazir
0
150
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.4k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
Building the Perfect Custom Keyboard
takai
2
710
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Ruling the World: When Life Gets Gamed
codingconduct
0
160
Navigating Team Friction
lara
192
16k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
110
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
620
KATA
mclloyd
PRO
35
15k
Leo the Paperboy
mayatellez
4
1.5k
Transcript
B R I A N H O LT – @
H O LT B T – N E T F L I X
None
W H AT ’ S C O O L A
B O U T R E A C T • Components • One way data flow • Shareable components • Predictable location of logic • Performance, most of the time
W H AT ’ S N O T C O
O L A B O U T R E A C T • File size • Performance, sometimes
None
W H Y Y O U M AY U S
E P R E A C T O R I N F E R N O • File size • Performance, sometimes • lol
F I L E S I Z E • Production
build, minified, gzipped • Preact: 3KB • Inferno: 9KB • React (15.4 w/ react-dom): 45KB • Vue: 23KB • Angular (2, without RX): 112KB • Ember (2.2): 111KB
P E R F UI benchmark suite (lower is better)
Taken from infernojs.org
C O M PAT • preact-compat (+5KB) and inferno-compat (+4KB)
• Literally drop in replacement for React and React-DOM
D E M O
None
A L I A S • YOU DON’T EVEN HAVE
TO REFACTOR YOUR CODE • (bottom section nho.lt/react)
W H Y Y O U M AY N O
T WA N T T O U S E P R E A C T O R I N F E R N O • Facebook • Community • Fiber • Sometimes not totally drop in due to dependencies • Almost all the big deps work though, like react-redux and react-router
W H AT P R E A C T /
I N F E R N O L A C K • Mixins • React.createClass • Refs • Synthetic Events (Inferno does some)
P R E A C T V S I N
F E R N O • Preact has a smaller file size • Inferno performs better
H O W M U C H T I M
E Y O U S AV E O N 2 G • Download time for our apps • Preact (6.2KB): ½ second • Inferno (12.2KB): 1 second • React (45.3KB): 4 seconds
O T H E R F R A M E
W O R K S O N 2 G • Just the framework: • Vue (23KB): 2 seconds • Angular (112KB): 9 seconds • Ember (111KB): 9 seconds
@holtbt