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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
550
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
460
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
480
Ruby on Railsの正体と向き合い方 / What is Ruby on Rails and how to deal with it?
yasaichi
146
95k
Other Decks in Programming
See All in Programming
AIとRubyの静的型付け
ukin0k0
0
560
Vite+ Unified Toolchain for the Web
naokihaba
0
230
A2UI という光を覗いてみる
satohjohn
1
120
Oxlintのカスタムルールの現況
syumai
6
1.1k
net-httpのHTTP/2対応について
naruse
0
470
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
140
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.2k
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
190
スマートグラスで並列バイブコーディング
hyshu
0
120
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
490
AIで効率化できた業務・日常
ochtum
0
120
Oxcを導入して開発体験が向上した話
yug1224
4
300
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Amusing Abliteration
ianozsvald
1
200
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
Mobile First: as difficult as doing things right
swwweet
225
10k
HDC tutorial
michielstock
2
700
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
71
40k
Scaling GitHub
holman
464
140k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
250
The untapped power of vector embeddings
frankvandijk
2
1.8k
How to Ace a Technical Interview
jacobian
281
24k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
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