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
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
7
3.3k
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
15
3.1k
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
380
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
270
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
240
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
190
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
140
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
300
OS アップデート対応の取り組み方がもっと共有されてほしい
andpad
0
110
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
190
技術記事、 専門家としてのプログラマ、 言語化
mizchi
14
7.3k
自作OSでスライド発表する
uyuki234
1
3.7k
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
97
6.7k
RailsConf 2023
tenderlove
30
1.5k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
260
Everyday Curiosity
cassininazir
0
250
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Exploring anti-patterns in Rails
aemeredith
3
440
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Fireside Chat
paigeccino
42
4k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.7k
Leo the Paperboy
mayatellez
8
1.9k
Site-Speed That Sticks
csswizardry
13
1.2k
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