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
Search
masaru-tech
April 26, 2017
Programming
1
600
「はやい、やすい、うまい?」React Native
kawasaki.rb #047の発表スライドです。
masaru-tech
April 26, 2017
Tweet
Share
More Decks by masaru-tech
See All by masaru-tech
Sidekiqでクラスターモードは使えるのか? / kawasakirb_060
masarutech
0
780
stimulusの感触
masarutech
0
45
kawasakirb053
masarutech
0
5.5k
kawasakirb051
masarutech
0
480
Other Decks in Programming
See All in Programming
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
770
ATDDで素早く安定した デリバリを実現しよう!
tonnsama
1
1.8k
情報漏洩させないための設計
kubotak
5
1.3k
週次リリースを実現するための グローバルアプリ開発
tera_ny
1
1.2k
asdf-ecspresso作って 友達が増えた話 / Fujiwara Tech Conference 2025
koluku
0
1.4k
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
100
各クラウドサービスにおける.NETの対応と見解
ymd65536
0
250
快速入門可觀測性
blueswen
0
500
DMMオンラインサロンアプリのSwift化
hayatan
0
180
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
8
1.9k
オニオンアーキテクチャを使って、 Unityと.NETでコードを共有する
soi013
0
370
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Statistics for Hackers
jakevdp
797
220k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Building Adaptive Systems
keathley
38
2.4k
Site-Speed That Sticks
csswizardry
2
270
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Transcript
ʮ͍ɺ͍͢ɺ͏·͍ʁʯ React Native kawasaki.rb #047 @MasaruTech
ΞδΣϯμ ▸ ࣗݾհ ▸ React Nativeͱ ▸ ͍ ▸ ͍͢
▸ ͏·͍ʁ
ࣗݾհ ▸ Rails͓ͬͯࣄͯ͠ΔΤοεΞΠΞʔ ▸ kawasaki.rb#046͔ΒࢀՃ ▸ ͜͜2ϲ݄ͪΐͬͱϓϥΠϕʔτͰReact NativeΛͬͯ ΞϓϦΛ࡞ͬͯΈ͍ͯΔͱ͜Ζ ▸
Swift/Xcodeॳ৺ऀɺAndroidະܦݧ େఉɹকʢΦΦόɹϚαϧʣ
React Native
React Nativeͱ ▸ FacebookͷReact.jsϕʔεͰωΠςΟϒΞϓϦ͕࡞Ͱ͖ ΔϑϨʔϜϫʔΫ (React 3ܑఋͷ࣍உ) ▸ Webͷࣝ/ٕज़(JS, CSS
LikeͳStyle, npm)Ͱ։ൃͰ͖Δ ▸ ΫϩεϓϥοτϑΥʔϜͰͳ͍ (Learn once, write anywhereɿҰֶɺͲ͜Ͱॻ͚Δ)
͍ɺ͍͢ɺ͏·͍ʁ
͍
։ൃ͍ ▸ ίϯύΠϧॳճىಈ࣌ͷΈ Ҏ߱ίʔυΛมߋͯ͠࠶ίϯύΠϧͤͣʹߋ৽Մೳ ▸ npmͷϥΠϒϥϦ͕͑Δ ▸ ωΠςΟϒͷAPIΒͳͯ͘Կͱ͔ͳΔ ެࣜͷυΩϡϝϯτಡΊେମͲ͏ʹ͔ɾɾɾ ▸
σόοά׳ΕͨChromeͷDeveloper Tool͕͑Δ
ಈ࡞͍ ▸ UIωΠςΟϒଆͰඳը͞ΕΔ ωΠςΟϒͷUIΛJS͕ίϯτϩʔϧ ▸ ListɺύϑΥʔϚϯεͷ࠷దԽ͕͞Ε͍ͯΔ ▸ JSͰΰϦΰϦʹॲཧΛॻ͘ͱ͘ͳΔ(Β͍͠)
͍͢
͡Ί͍͢ ▸ JSͰهड़͢ΔͷͰɺWebͷࣝ͑͋͞Εswift/javaΛΒ ͳͯ͘ΞϓϦΛ࡞ΕΔ ▸ BabelReact Native͕Α͠ͳʹͯ͘͠ΕΔͷͰɺReact.jsͷ Α͏ʹઃఆΛؾʹͤͣES2015/2016Ͱॻ͚Δ
ViewΛΈ͍͢ ▸ ͜Εʹਚ͖Δ ▸ ॳ৺ऀʹSwiftɺXcodeͷIB(Interface Builder)ͰViewΛ Ήͷ͍͠ UIܥΛશͯIBͰࢦఆͰ͖ͳ͍ɻɻɻ ▸ CSSʹࣅͨهड़Ͱॻ͚ΔͷͰWebͷΑ͏ʹσβΠϯ͕Ͱ͖Δ
Viewͷྫ return ( <View style={styles.container}> <Image style={styles.thumbnail} source={{uri: "https://pbs.twimg.com/profile_images/ xxxxxxxxx.jpeg"}}/>
<View style={styles.mainContainer}> <View style={styles.header}> <View style={styles.userInfo}> <Text style={styles.username}> {item.username} </Text> <Text style={styles.accountNo}> {item.accountNo} </Text> </View> <View> <Text style={styles.postedAt}> {item.postedAt} </Text> </View> </View> <View style={styles.messageContainer}> <Text> {item.message} </Text> </View> </View> </View> );
const styles = StyleSheet.create({ container: { padding: 10, borderBottomColor: '#ededed',
borderBottomWidth: 1, backgroundColor: 'transparent', flexDirection: 'row', }, thumbnail: { width: 34, height: 34, borderRadius: 17 }, mainContainer: { flex: 1, flexDirection: 'column', marginLeft: 10, }, header: { flexDirection: 'row', }, userInfo: { flex: 1, flexDirection: 'row' }, username: { fontSize: normalize(16), color: colors.grey1, fontWeight: '800' }, accountNo: { color: colors.grey3, fontSize: normalize(12), marginLeft: 5, marginTop: 3 }, postedAt: { color: colors.grey3, fontSize: normalize(12), marginTop: 3 }, messageContainer: { flexDirection: 'row', marginTop: 10 }, });
͏·͍ʁ
͏·͍Ͱʒ͔͕ͨͬͨࢥ͍͔ͭͳ͔ͬͨ ͳͷͰศརͳϦϩʔυػೳΛհ
Ϧϩʔυ ▸ Reload(⌘+R) ௨ৗͷϦϩʔυ ▸ Live Reload ϑΝΠϧʹมߋ͕͋ΔͱࣗಈͰϦϩʔυ State͕ॳظঢ়ଶʹͳΔ ▸
Hot Reload ϑΝΠϧʹมߋ͕͋ΔͱࣗಈͰϦϩʔυ Stateอ࣋ͨ͠··
·ͱΊ ʮ͍ɺ͍͢ɺ͏·͍ʯ ↓ ʮ͍ɺ͍͢ɺΜΓʯͰͨ͠
͓ΘΓ ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠