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
React to Vue: why and how?
Search
Rahul Kadyan
March 17, 2018
Programming
0
51
React to Vue: why and how?
A quick guide on moving from React to Vue.
Rahul Kadyan
March 17, 2018
Tweet
Share
More Decks by Rahul Kadyan
See All by Rahul Kadyan
Inversion of Control in a Vue Application
znck
0
340
New Vue. New Compiler. Let's Unpack
znck
4
2.5k
Head first into composition API
znck
0
150
Future of Vue – JSFoo VueDay 2019
znck
0
510
Collocation in Modern Web
znck
0
47
Choosing Vue.js
znck
0
41
Other Decks in Programming
See All in Programming
Agentic Applications with Symfony
el_stoffel
2
270
AWSで雰囲気でつくる! VRChatの写真変換ピタゴラスイッチ
anatofuz
0
140
Develop Faster With FrankenPHP
dunglas
2
3.2k
AHC 044 混合整数計画ソルバー解法
kiri8128
0
330
[NG India] Event-Based State Management with NgRx SignalStore
markostanimirovic
1
110
スモールスタートで始めるためのLambda×モノリス
akihisaikeda
2
180
国漢文混用体からHolloまで
minhee
1
170
趣味全開のAITuber開発
kokushin
0
190
Qiita Bash
mercury_dev0517
1
190
AHC045_解説
shun_pi
0
470
小田原でみんなで一句詠みたいな #phpcon_odawara
stefafafan
0
320
これだけは知っておきたいクラス設計の基礎知識 version 2
masuda220
PRO
24
6k
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
328
21k
BBQ
matthewcrist
88
9.6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
23
2.6k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
4 Signs Your Business is Dying
shpigford
183
22k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
Navigating Team Friction
lara
184
15k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.4k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.3k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Being A Developer After 40
akosma
91
590k
Site-Speed That Sticks
csswizardry
5
480
Transcript
export default class SayHello extends Component { render () {
return ( <div id='hello'> <h1>{'Hello Everyone!'} </h1> <p>{'Welcome to ReactFoo Hyderabad!'} </p> </div> ) } }
React to Vue
react | rɪˈakt | verb [no object] 1 act in
response to something; respond in a particular way
Myths & Misconceptions
Templates are bad JSX Mutable State Directives Two-way Binding Watchers
Templates The Good · The Bad · The Ugly •
Approachable • Choice of Dialects • Static & Limited • Week Tooling Support • Scope
None
Event Modifiers HTML Preprocessor Reusing existing code
JSX shouldn’t be reason to choose a library. • Flexible
• Advanced Tooling • Verbosity • Static Optimisation • Steep Learning Curve
export default class SayHello extends Component { render () {
return ( <div id='hello'> <h1>{'Hello Everyone!'} </h1> <p>{'Welcome to ReactFoo Hyderabad!’} </p> </div> ) } }
import Component from 'vue' import { Component as VueComponent }
from 'vue-class-component' @VueComponent export default class SayHello extends Component { render () { return ( <div id='hello'> <h1>{'Hello Everyone!'} </h1> <p>{'Welcome to ReactFoo Hyderabad!'} </p> </div> ) } }
Mutable State It’s actually Observed State. • Dependency Tracking •
Computed Properties • Watchable State • Required Re-renders
None
Directives are not so bad. • Necessary Extension • Customise
Compilation • Concerns Separation • Can mutate DOM • YOU DON’T NEED THEM
Internationalisation ACL
Two-way Binding is just Syntax Sugar. • Reduced Boilerplate •
Edge-case handling
Syntactic Sugar Modifiers
Watchers add explicit dependencies on Observed State. • Explicit Dependency
• Reactive
Watchers
Shared Features • Declarative Rendering • Component Composition • Virtual
DOM • IDE Support • Robust Testing Toolkit • State Management • Client Side Routing
What do you get with Vue ?
Single File Components
Scoped Styles
Content Distribution
Async Component Transitions Universal SSR
Take Away Vue is similar to React but reactive. Few
different design decisions. Created with high regards to Developer Experience.
@znck0 Twitter znck Github znck.me Website vue-bangalore Meetup