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 Native所感 / techcamp03
Search
Yuichi Goto
May 22, 2017
Programming
1.4k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
モダンフロントエンド + React Native所感 / techcamp03
第3回開発合宿(2017/05/22)
Yuichi Goto
May 22, 2017
More Decks by Yuichi Goto
See All by Yuichi Goto
[Teaser] Type-Safe Lightweight DDD with Effect Schema
yasaichi
3
560
Google Cloud を用いたソフトウェア開発の内製化組織の早期立ち上げの実現 / Rapid Establishment of In-House Software Development Teams Using Google Cloud
yasaichi
1
1.7k
[EN] Robust and Scalable API Gateway Built on Effect
yasaichi
3
470
Effectで作る堅牢でスケーラブルなAPIゲートウェイ / Robust and Scalable API Gateway Built on Effect
yasaichi
9
2.5k
あるRailsエンジニアがビジネスリーダーに転身するまで
yasaichi
9
3.3k
Active Recordから考える次の10年を見据えた技術選定 / Architecture decision for the next 10 years at PIXTA
yasaichi
50
23k
Active Recordから考える次世代のRuby on Railsの方向性 / Directions for the next generation of Ruby on Rails: From the viewpoint of its Active Record
yasaichi
38
22k
ピクスタのエンジニアリングとCircleCI / Software Engineering with CircleCI at PIXTA
yasaichi
1
490
Ruby on Railsの正体と向き合い方 / What is Ruby on Rails and how to deal with it?
yasaichi
147
95k
Other Decks in Programming
See All in Programming
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
280
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
220
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
310
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
1k
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
570
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
180
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
450
どこまでゆるくて許されるのか
tk3fftk
0
290
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
620
A2UI という光を覗いてみる
satohjohn
1
170
The NotImplementedError Problem in Ruby
koic
1
1k
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
630
Featured
See All Featured
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
430
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Navigating Team Friction
lara
192
16k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
230
30 Presentation Tips
portentint
PRO
1
340
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
170
Agile that works and the tools we love
rasmusluckow
331
22k
Balancing Empowerment & Direction
lara
6
1.2k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
380
Why Our Code Smells
bkeepers
PRO
340
58k
Tell your own story through comics
letsgokoyo
1
980
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Transcript
ϞμϯϑϩϯτΤϯυ + React Nativeॴײ ୈ3ճ։ൃ߹॓Ռൃදɹyasaichi
ൃදߏ 1. എܠͱత 2. ٕज़֓ཁ 3. ࣮ࡍʹͬͯΈͨ 4. ॴײ
എܠͱత
എܠ1: લճͷ߹॓@2016Ն • ReactͰॻ͍ͨMinesweeperΛվྑͨ͠ • CSS Modules, css next, PostCSSͷಋೖΛ
௨ͯ͡ϞμϯCSSٕज़ʹ৮Εͨ • ซͤͯϏϧυपΓΛGulp + Browserify͔Β npm-scripts + webpackʹҠߦͨ͠
͜ΕͰϞμϯϑϩϯτΤϯυ ։ൃҰ௨Γ͑ͨͰʂ
ͦΜͳ;͏ʹߟ͍͑ͯͨ ࣌ظ͕Զʹ͋Γ·ͨ͠
എܠ2: ReactҠߦ@2016ळౙ • Knockout -> ReactҠߦ࣌ʹഊΛΔ • Reduxʢͷഎܠʹ͋ΔFluxʣ͕Θ͔Βͳ͍ • APIܦ༝Ͱऔಘͨ͠ΛͲ͏͖͔࣋ͭ
• SPAͩͬͨΒRoutingߟ͑ͳ͍ͱμϝΜ
͢Έ·ͤΜͰͨ͠
ࠓճͷ߹॓ͷత • ϑϩϯτΤϯυਂ۷Γ + React Nativeௐࠪ • ϒϥβͰಈ͘SPAΔؾ͕Ͱͳ͔ͬͨ • ߹॓લ:
ReduxͷಋೖRoutingपΓͷ࣮ • ߹॓த: OAuthΛͬͨೝূͷ࣮
ٕज़֓ཁ
React Native • ReactͰωΠςΟϒΞϓϦ͕࡞ΕΔͭ • Facebook͕։ൃʢFB, InstaͰ͍ͬͯΔʣ • Ϗϧυ͢ΔͱAndroid /
iOSͰಈ͘ • ը໘JSXͱCSSʹࣅͨԿ͔Ͱهड़
αϯϓϧ: View component /* Logo.css */ .logo { width: 200px;
height: 200px; } // index.ios.js import React from 'react'; import { AppRegistry, Text, View } from 'react-native'; import styles from './styles'; function AwesomeProject() { return ( <View style={styles.container}> <Text style={styles.hello}> Hello, World! </Text> </View> ); } AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);
αϯϓϧ: Styling // styles.ios.js import { StyleSheet } from 'react-native';
export default StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', }, hello: { fontSize: 20, }, }); ComponentͷϨΠΞτ ʹFlexboxΛ͏
Ϗϧυ͢Δͱ͜Μͳײ͡ ※ ॳճͷΈϏϧυ͕ඞཁͰɺҎ߱㵰+RͰϦϩʔυͰ͖Δ
React Navigation • React NativeͷφϏήʔγϣϯϥΠϒϥϦ • keyͱComponentͷϚοϓΛఆٛͯ͠͏ • React NativeެࣜʢͷυΩϡϝϯτʣਪ͠
• WebͰ͍͏react-router
αϯϓϧ /* Logo.css */ .logo { width: 200px; height: 200px;
} import React, { Component } from 'react'; import { AppRegistry, Button, Text, View } from 'react-native'; import { StackNavigator } from 'react-navigation'; import styles from './styles'; class Home extends Component { static navigationOptions = { title: 'Home' }; render() { const { navigate } = this.props.navigation; return ( <View style={styles.container}> <Button onPress={() => navigate('Chat')} title="Chat with Rina" /> </View> ); } } … const AwesomeProject = StackNavigator({ Home: { screen: Home }, Chat: { screen: Chat }}); AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject); keyͱComponentͷϚοϓ
ςΩετΛλοϓ͢Δͱ νϟοτը໘ʹભҠ͢Δ
࣮ࡍʹͬͯΈͨ
ࠓճͷϥΠϒϥϦߏ • ͪΌΜͱ։ൃ͢Δࡍʹඞཁͦ͏ͳͷΛબ • Flux࣮: redux, react-redux • StoreपΓ: normalizr,
reselect • Routing: react-navigation
σϞ
None
None
ॴײ
ϞμϯϑϩϯτΤϯυ • ͪΌΜͱਂ۷ΓͰ͖ͨײ͋ͬͯΑ͔ͬͨ • ReduxΛ͏աఔͰFluxͷ֓೦͕ΫϦΞʹ • σʔλΛਖ਼نԽͯ͠StoreʹೖΕΔͱ͔ • Routingͬͯ͜Μͳײ͡ͰΔΜͩ
React Native • ࡐʹωΠςΟϒΞϓϦΛબΜͰྑ͔ͬͨ • ԶɺΞϓϦ࡞ΕΔʂͱ୯७ʹײಈ͢Δ • SPAͱͯ͠࡞Δ͔͠ͳ͍ͷͰਂ۷ΓͰ͖Δ • ͙͢ϦϩʔυͰ͖ΔͷͰɺखΛಈ͔͠ͳ͕Β
σβΠϯ࡞Δͷʹ͍ͯΔ
ͱ͍͑ • ߥதͷߥͩͳʔײ • ຊମͱΤίγεςϜ͕·ͩ҆ఆ͍ͯ͠ͳ͍ • Կ͔͋ͬͨΒ·ͣissueΛ୳͢ମྗ͕ඞཁ • ϓϥοτϑΥʔϜݻ༗ʢྫ: Deep
Linkʣͷ ͱ͜ΖΛ৮ΔʹωΠςΟϒଆͷ͕ࣝඞཁ
͓ർΕ͞·Ͱͨ͠ʂ Ռ: https://github.com/yasaichi/GHFav