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
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
130
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
The NotImplementedError Problem in Ruby
koic
1
800
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
140
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
340
AIで効率化できた業務・日常
ochtum
0
140
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
510
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.1k
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
2k
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
690
3Dシーンの圧縮
fadis
1
770
RTSPクライアントを自作してみた話
simotin13
0
610
Featured
See All Featured
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
170
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
230
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
270
WCS-LA-2024
lcolladotor
0
640
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Un-Boring Meetings
codingconduct
0
310
Exploring anti-patterns in Rails
aemeredith
3
410
Writing Fast Ruby
sferik
630
63k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
410
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