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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Swaroop SM
July 28, 2015
Programming
260
3
Share
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
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
160
CSC307 Lecture 17
javiergs
PRO
0
240
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
560
New "Type" system on PicoRuby
pocke
1
120
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
7
2.1k
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
8
1.9k
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
5
660
今さら聞けないCancellationToken
htkym
0
190
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
130
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.7k
ECR拡張スキャンでSBOMを収集して サプライチェーン攻撃の影響調査を 爆速で終わらせてみた
akihisaikeda
2
200
プロパティの順序で型推論が壊れる!? TypeScript6.0の修正からContext-Sensitivityの仕組みを追う
bicstone
2
1k
Featured
See All Featured
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
390
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Un-Boring Meetings
codingconduct
0
300
Balancing Empowerment & Direction
lara
6
1.1k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
820
The Curious Case for Waylosing
cassininazir
1
360
Color Theory Basics | Prateek | Gurzu
gurzu
0
320
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
210
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