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
Reactハンズオン 01 入門編 コード部分抜粋 / React Handson 01 co...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Shunsuke Watanabe
October 06, 2018
Programming
600
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
370
forループを越えて / beyond for loop
craftgear
0
580
Reactハンズオン 02 redux編 コード部分抜粋 / React Handson 02 redux (excerpt)
craftgear
0
590
Reactハンズオン 01 入門編 コード部分抜粋 / React Handson 01 components (excerpt)
craftgear
0
720
Reactで作るDrupalサイト
craftgear
0
500
大阪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
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
810
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
260
The NotImplementedError Problem in Ruby
koic
1
990
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
910
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
370
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
420
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
220
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
130
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
610
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
180
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
はてなアカウント基盤 State of the Union
cockscomb
1
1.1k
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Site-Speed That Sticks
csswizardry
13
1.2k
How to make the Groovebox
asonas
2
2.2k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
320
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
Prompt Engineering for Job Search
mfonobong
0
360
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
The SEO Collaboration Effect
kristinabergwall1
1
500
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.4k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
170
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