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
ReactJS Awesomeness
Search
Swaroop SM
July 28, 2015
Programming
260
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ReactJS Awesomeness
A quick introduction to ReactJS
Swaroop SM
July 28, 2015
More Decks by Swaroop SM
See All by Swaroop SM
Client-Side Data Modelling and more...
swaroopsm
0
63
Testing JavaScript like a "BOSS"
swaroopsm
0
68
The Truth About Truthy & Falsy
swaroopsm
1
61
Other Decks in Programming
See All in Programming
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
110
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
120
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
170
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
1
250
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
290
JAWS-UG横浜 #102 AWSサ終供養LT会 成仏できない AWS サービスたち 〜本日、三体供養します〜
maroon1st
0
260
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
0
110
AI時代に設計が 最大の生産性レバーになる 意図駆動開発とデータを消さない設計|Don't Delete Your Data or Your Intent — Design as the Deepest Lever in the AI Era
tomohisa
0
110
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
170
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
440
FDEが実現するAI駆動経営の現在地
gonta
2
230
Claude Team Plan導入・ガイド
tk3fftk
0
240
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
270
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
470
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
230
Become a Pro
speakerdeck
PRO
31
6k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
420
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
220
KATA
mclloyd
PRO
35
15k
How to make the Groovebox
asonas
2
2.3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Transcript
ReactJS Awesomeness
I don’t want to learn another JS framework.
Well what is it then?
• Born at Facebook. • Lets you build user interfaces.
• Described as the V in MVC. • Building large applications with data that changes over time. • Actively maintained. • https://github.com/facebook/react
I AM NOT CONVINCED
TIME TO GET SERIOUS
What it does not have? • No Router. • No
Controllers. • No Models. • No Templates.
What does it have then? • Components • And Components
• …. And Components
Separation of Concerns • Controller • Remove an item. •
Compl
Separate the Components
Component-Wise Separation • Composable • Reusable • Maintainable • Testable
STILL NO “REACTION?”
React Stuffs • Component • JSX • props • state
• refs • Virtual DOM • Server-Side Rendering
Component • Elements in view. Eg.: Button Widget, Shopping Cart
Widget etc. • `React.createClass({ })` • Must override the render method
None
JSX • A JS syntax extension that looks like XML
• Can be transformed into JS using React
None
props • Immutable • Attributes to a component. • Accessible
through `this.props`
None
state • Mutable • Set using `setState` • Access via
`this.state` • Triggers a render automatically when a state changes
None
refs • Lets you access references to individual components •
Manipulate the DOM • Use `this.refs`
None
Virtual DOM • Virtual Representation of DOM • Can keep
track of what has changes in the DOM • Render only the changed parts based on a diffing algorithm • VERY FAST!!!
Server-Side Rendering • Construct React components as an HTML on
the server-side and render it. • SEO for Free :)
Integrating with Rails • https://github.com/reactjs/react-rails • react_component(<Button />, props={}, html_options={})
#jally Thank You