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
React first impressions
Search
Takashi Kanemoto
January 15, 2016
Programming
190
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React first impressions
カルテット開発部社内勉強会 LT 資料
Takashi Kanemoto
January 15, 2016
More Decks by Takashi Kanemoto
See All by Takashi Kanemoto
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
2
350
30分でDoctrineの仕組みと使い方を完全にマスターする / phpconkagawa 2025 Doctrine
ttskch
5
1.6k
いりゃあせ、PHPカンファレンス名古屋2025 / Welcome to PHP Conference Nagoya 2025
ttskch
1
620
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
1.4k
今年書いた技術記事で伸びたやつの自慢と自分の中では力作なのにさっぱり伸びなかったやつの供養 / My Tech Articles 2024
ttskch
2
240
FigmaとPHPで作る1ミリたりとも表示崩れしない最強の帳票印刷ソリューション
ttskch
48
45k
データベース/SQL超入門!完全初心者向けに世界一分かりやすく解説します
ttskch
2
8.8k
Symfony UX Autocompleteとかいう 顧客が本当に必要だったもの
ttskch
0
2.4k
就活生あるいは新人エンジニアさんへのお節介なアドバイス
ttskch
0
1.7k
Other Decks in Programming
See All in Programming
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
370
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
120
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
500
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
320
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
350
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
350
Webの地図
yosuke_furukawa
PRO
6
4.7k
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
900
setup-vp GitLab対応の裏側
naokihaba
0
120
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
650
個人開発基盤をまるごとCloudflareに引っ越して爆速で総合的体験を向上させた話
tinykitten
0
200
Verilogで学ぶCPU自作入門.pdf
uyuki234
2
860
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
42k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
360
Skip the Path - Find Your Career Trail
mkilby
1
240
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
720
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
330
The Curious Case for Waylosing
cassininazir
1
520
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
990
Practical Orchestrator
shlominoach
192
12k
Speed Design
sergeychernyshev
33
2.1k
Transcript
React first impressions 2016.01.15 @qckanemoto 1 / 45
(1) What's that? 2 / 45
3 / 45
4 / 45
5 / 45
A JavaScript Library for Building User Interfaces 6 / 45
7 / 45
8 / 45
9 / 45
(2) Features? 10 / 45
11 / 45
12 / 45
13 / 45
14 / 45
15 / 45
16 / 45
17 / 45
(3) Example 18 / 45
var Hello = React.createClass({ render: function () { return <p>Hello,
React!</p>; } }); ReactDOM.render( <Hello />, document.getElementById('app') ); <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>React Example</title> <script src="//some/cdn/react.js"></script> <script src="//some/cdn/react-dom.js"></script> <script src="//some/cdn/babel-core/browser.min.js"></script> </head> <body> <div id="app"></div> <script type="text/babel" src="app.js"></script> </body> </html> 19 / 45
var Hello = React.createClass({ // It's called 'Component' render: function
() { return <p>Hello, React!</p>; } }); ReactDOM.render( <Hello />, document.getElementById('app') ); <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>React Example</title> <script src="//some/cdn/react.js"></script> <script src="//some/cdn/react-dom.js"></script> <script src="//some/cdn/babel-core/browser.min.js"></script> </head> <body> <div id="app"></div> <script type="text/babel" src="app.js"></script> </body> </html> 20 / 45
var Hello = React.createClass({ render: function () { return <p>Hello,
React!</p>; } }); ReactDOM.render( <Hello />, // Set the Component... document.getElementById('app') ); <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>React Example</title> <script src="//some/cdn/react.js"></script> <script src="//some/cdn/react-dom.js"></script> <script src="//some/cdn/babel-core/browser.min.js"></script> </head> <body> <div id="app"></div> <script type="text/babel" src="app.js"></script> </body> </html> 21 / 45
var Hello = React.createClass({ render: function () { return <p>Hello,
React!</p>; } }); ReactDOM.render( <Hello />, // Set the Component document.getElementById('app') // to the element '#app' ); <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>React Example</title> <script src="//some/cdn/react.js"></script> <script src="//some/cdn/react-dom.js"></script> <script src="//some/cdn/babel-core/browser.min.js"></script> </head> <body> <div id="app"></div> <!-- Here --> <script type="text/babel" src="app.js"></script> </body> </html> 22 / 45
23 / 45
Next step (2/5) 24 / 45
Use props var Hello = React.createClass({ render: function () {
return <p>Hello, React!</p>; } }); var Hello = React.createClass({ render: function () { return <p>Hello, <World name="React props" />!</p>; } }); var World = React.createClass({ render: function () { return <span>{this.props.name}</span>; } }); 25 / 45
26 / 45
props is that passed from parent. 27 / 45
Next step (3/5) 28 / 45
Use state var Hello = React.createClass({ render: function () {
return <p>Hello, <World name="React props" />!</p>; } }); var Hello = React.createClass({ getInitialState: function () { return { worldName: 'React state' }; }, render: function () { return <p>Hello, <World name={this.state.worldName} />!</p>; } }); 29 / 45
30 / 45
state is that held by itself. 31 / 45
Next step (4/5) 32 / 45
Change state var Hello = React.createClass({ getInitialState: function () {
return { worldName: 'React state' }; }, + // just change state after 1 sec + componentDidMount: function () { + var that = this; + setTimeout(function () { + that.setState({ worldName: 'Changed state' }); + }, 1000); + }, render: function () { return <p>Hello, <World name={this.state.worldName} />!</p>; } }); 33 / 45
34 / 45
35 / 45
When state updated component re-rendere whole tree under itself. 36
/ 45
Final step (5/5) 37 / 45
Make child stateful var World = React.createClass({ render: function ()
{ return <span>{this.props.name}</span>; } }); var World = React.createClass({ getInitialState: function () { return { name: this.props.name }; }, render: function () { return <span>{this.state.name}</span>; } }); 38 / 45
39 / 45
Not changed 40 / 45
props is immutable. state is mutable. 41 / 45
Conclusion 42 / 45
React is a JavaScript FW Component Oriented powered by One-way
Reactive Data Flow Virtual DOM Immutable props & Mutable state 43 / 45
Also has Two-way Binding And It's Necessary for some complicated
apps (I think) Similar to Angular2 ? 44 / 45
Thanks :) 45 / 45