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ハンズオン 01 入門編 コード部分抜粋 / React Handson 01 co...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Shunsuke Watanabe
October 06, 2018
Programming
630
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Reactハンズオン 01 入門編 コード部分抜粋 / React Handson 01 components (excerpt)
改訂2版
Shunsuke Watanabe
October 06, 2018
More Decks by Shunsuke Watanabe
See All by Shunsuke Watanabe
いますぐ {id: number;} をやめろ
craftgear
1
400
forループを越えて / beyond for loop
craftgear
0
620
Reactハンズオン 02 redux編 コード部分抜粋 / React Handson 02 redux (excerpt)
craftgear
0
630
Reactハンズオン 01 入門編 コード部分抜粋 / React Handson 01 components (excerpt)
craftgear
0
770
Reactで作るDrupalサイト
craftgear
0
530
大阪Node学園 七時限目 「ゼロからはじめるnode.js」
craftgear
1
430
大阪Node学園 六時限目 「generator小咄」
craftgear
1
350
大阪Node学園四時限目 "This crazy testless world"
craftgear
1
350
Other Decks in Programming
See All in Programming
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
380
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
170
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
180
残高管理から台帳サービスへの進化
artoy
1
190
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
Domain-Driven Transformation
hschwentner
2
2.3k
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.1k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
210
Featured
See All Featured
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
270
Mobile First: as difficult as doing things right
swwweet
225
10k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Why Our Code Smells
bkeepers
PRO
340
58k
Fireside Chat
paigeccino
43
4.1k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Transcript
1 // src/components/HelloWorld.js 2 3 import React from 'react'; 4
5 export default () => { 6 return <h1>Hello World</h1> 7 } 1 // src/App.js 2 3 import React, { Component } from 'react'; 4 import logo from './logo.svg'; 5 import './App.css'; 6 import HelloWorld from './components/HelloWorld'; 7 8 class App extends Component { 9 render() { 10 return ( 11 <div className="App"> 12 <HelloWorld /> 13 <header className="App-header"> 14 <img src={logo} className="App-logo" alt="logo" /> 15 <h1 className="App-title">Welcome to React</h1> 16 </header> 17 <p className="App-intro"> 1
1 // src/App.js 2 …… 8 class App extends Component
{ 9 render() { 10 return ( 11 <div className="App"> 12 <HelloWorld greeting="͓Α͏" /> …… 20 </div> 21 ); 22 } 23 } 24 25 export default App; 1 // src/components/HelloWorld.js 2 3 import React from 'react'; 4 5 export default props => { 6 return <h1>{props.greeting} World</h1>; 7 }; 2
1 // src/components/HelloWorld.js 2 3 import React from 'react'; 4
5 export default ({ greeting }) => { 6 return <h1>{greeting} World</h1>; 7 }; 3
1 // src/components/HelloWorld.js 2 3 import React from 'react'; 4
5 export default ({ greeting = 'Bonjour' }) => { 6 return <h1>{greeting} World</h1>; 7 } 1 // src/App.js 2 …… 8 class App extends Component { 9 render() { 10 return ( 11 <div className="App"> 12 <HelloWorld /> …… 20 </div> 21 ); 22 } 23 } 24 25 export default App; 4 ←greetingΛফ͢
1 // src/components/HelloWorld.js 2 3 import React from 'react'; 4
5 const styles = { 6 h1: { 7 color: 'gold', 8 backgroundColor: 'black' 9 } 10 } 11 12 export default ({ greeting = 'Bonjour', to }) => { 13 return ( 14 <h1 style={styles.h1}> 15 {greeting} {to} 16 </h1> 17 ); 18 }; 5
1 // src/App.js …… 8 class App extends Component {
9 constructor(props) { 10 super(props); 11 this.state = { 12 greeting: 'Hello', 13 to: 'World', 14 }; 15 this.updateGreeting = this.updateGreeting.bind(this); 16 } 17 18 updateGreeting() { 19 this.setState({ greeting: '͜Μʹͪ' }); 20 } 21 22 render() { 23 return ( 24 <div className="App"> 25 <HelloWorld greeting={this.state.greeting} to={this.state.to} /> 26 <button onClick={this.updateGreeting}>͍͋ͭ͞มߋ</button> 27 <header className="App-header"> 28 <img src={logo} className="App-logo" alt="logo" /> 6