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
Shunsuke Watanabe
October 06, 2018
Programming
620
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
610
Reactハンズオン 02 redux編 コード部分抜粋 / React Handson 02 redux (excerpt)
craftgear
0
630
Reactハンズオン 01 入門編 コード部分抜粋 / React Handson 01 components (excerpt)
craftgear
0
760
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
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
450
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
180
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
550
AHC070解法紹介
eijirou
0
130
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
560
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
120
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
120
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
240
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
190
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
180
Heart of Swift Concurrency
koher
0
920
新卒PdEのリアル
ryu1013
1
510
Featured
See All Featured
Amusing Abliteration
ianozsvald
1
310
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
330
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
940
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Technical Leadership for Architectural Decision Making
baasie
3
570
Product Roadmaps are Hard
iamctodd
55
13k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
330
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
550
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