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
Native開発者から見たReactNative
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
y_matsuwitter
March 31, 2015
Programming
8k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Native開発者から見たReactNative
at Gunosy React Meetup
y_matsuwitter
March 31, 2015
More Decks by y_matsuwitter
See All by y_matsuwitter
LLMと共に進化するプロセスを目指して
ymatsuwitter
13
5.1k
Building Products in the LLM Era
ymatsuwitter
11
13k
Product Utilization of Large Language Models Starting Today
ymatsuwitter
3
3.5k
経営・意思・エンジニアリング
ymatsuwitter
23
22k
LLM in 2023 and 2024
ymatsuwitter
8
6.3k
Turbulent Technological Changes and Career Strategies
ymatsuwitter
2
3.2k
LLM in toB Service and Its UX
ymatsuwitter
7
12k
Agent and small LLM validation
ymatsuwitter
7
3.1k
Information management for a culture of speed: The story of Notion and LayerX
ymatsuwitter
4
11k
Other Decks in Programming
See All in Programming
数百円から始めるRuby電子工作
tarosay
0
140
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
590
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
320
Built Our Own Background Agent at LayerX
layerx
PRO
9
5.1k
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
210
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
150
今さら聞けない .NET CLI
htkym
0
190
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.7k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
550
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
220
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
3.6k
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
180
Featured
See All Featured
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.3k
Making Projects Easy
brettharned
120
6.7k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
430
The SEO identity crisis: Don't let AI make you average
varn
0
530
What's in a price? How to price your products and services
michaelherold
247
13k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
410
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
630
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Site-Speed That Sticks
csswizardry
13
1.4k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
350
Unsuck your backbone
ammeep
672
58k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
260
Transcript
Na#veApp։ൃऀ͔ΒΈͨ ReactNa#ve
Who$am$I? • ։ൃຊ෦ࣥߦһࡶ༻ • iOS,&Android,&Infrastructure,&Web • Golangڭ • ਖ਼࠲ •
࠷ۙؾʹͳΔͷ:&MQTT
ωΠςΟϒ։ൃͰͷελϯε • ωΠςΟϒΞϓϦ֤Pla%orm͝ͱʹ࠷దԽࣗͰΔ • ΫϩεϓϥοτϑΥʔϜʹເݟͳ͍
ReactNa'veͱ • ReactjsϕʔεͰωΠςΟϒΞϓϦ։ൃΛߦ͏ͨΊͷπʔϧηο τɻ • Not+only+for+DOM,+But+for+any+Views. • 03/27ʹɺiOS͚͕ϦϦʔε
ViewͷநԽ • Na$veଆͰjsx*<=>*Na$veͷViewͷมΛߦ͏ • iOSͰjsxΛUIKitʹม͍ͯ͠Δ༷ • ྨࣅ:*ReactCanvas*(jsx*<=>*Canvas)
ReactNa'veΛݟͯΈΑ͏ QiitaͷReactjsλάϦʔμʔΛ࡞ͬͯΈΔ
֤छϞδϡʔϧͷϩʔυ 'use strict'; var React = require('react-native'); var { AppRegistry,
// ΞϓϦͷىಈϙΠϯτ StyleSheet, // ֤ཁૉͷελΠϧ Text, // ςΩετϥϕϧ View, // View ListView, // Ϧετ Image, // ը૾View NavigatorIOS, // iOSͷUINavigationController TouchableWithoutFeedback, //λονΠϕϯτͷऔಘ WebView // WebView } = React; var QIITA_URL = "https://qiita.com/api/v2/tags/reactjs/items";
φϏήʔγϣϯͷఆٛ • ΞϓϦ͕࠷ॳʹىಈ͢ΔViewControllerͱͯ͠ࠓճNaviga0on Λͬͨ // ϕʔεͷUINavigationControllerʹ֘͢Δͷ var ReactQiitaNavigator = React.createClass({
render: function() { return ( <NavigatorIOS style={styles.navigator} initialRoute={{ component: ReactQiitaList, title: 'ReactQiita', }}/> ); } })
Listදࣔ:&ॳظԽ // هࣄҰཡϦετ var ReactQiitaList = React.createClass({ getInitialState: function() {
return { items: new ListView.DataSource({ rowHasChanged: (row1, row2) => row1 !== row2, }), loaded: false, }; }, componentDidMount: function() { this.fetchData(); //σʔλͷऔಘʢޙड़ʣ },
ListView:)શମඳը render: function() { if (!this.state.loaded) { // ಡΈࠐΈϏϡʔͷඳըʢࠓճઆ໌লུʣ return
this.renderLoadingView(); } return ( <ListView dataSource={this.state.items} renderRow={this.renderItem} //֤ߦͷඳըϝιουΛࢦఆ style={styles.listView}/> ); },
ListView:)ߦͷඳը :"TouchableWithoutFeedback̎ͭҎ্ͷࢠΛԼʹ࣋ͯͳ͍ renderLoadingView: function() { /*লུ*/ }, renderItem: function(item, sectionID,
rowID) { return ( <TouchableWithoutFeedback onPress={() => this.onPressed(item)}> // Πϕϯτݕ <View style={styles.container}> <Image source={{uri: item.user.profile_image_url}} style={styles.thumbnail}/> <View style={styles.rightContainer}> <Text style={styles.title}>{item.title}</Text> <Text style={styles.name}>{item.user.id}</Text> </View> </View> </TouchableWithoutFeedback> ); },
ListView:)APIͷऔಘ window.fetch͕ඪ४Ͱ͑ΔʢCORSͷ੍ͳ͠ʣ fetchData: function() { fetch(QIITA_URL) .then((response) => response.json()) .then((responseData)
=> { this.setState({ items: this.state.items.cloneWithRows(responseData), loaded: true, }); }) .done(); },
ListView:)Πϕϯτͷॲཧ iOSͰͷViewؒͷભҠprops.navigatorͷpush,4popϝιουͳͲ ͕͑Δ //ηϧͷλονΠϕϯτ onPressed: function(item) { this.props.navigator.push({ title: item.title,
component: ReactQiitaItemView, passProps: { url: item.url } }) },
WebView // هࣄӾཡ༻ͷWebView var ReactQiitaItemView = React.createClass({ render: function() {
return ( <WebView url={this.props.url}/> ) } });
ελΠϧͷهड़ // ֤छσβΠϯཁૉɺҰ෦ൈਮ var styles = StyleSheet.create({ navigator: { flex:
1 }, container: { flex: 1, flexDirection: 'row', justifyContent: 'center', alignItems: 'center', backgroundColor: '#FFFFFF', }, }
ىಈ࣌ΤϯτϦϙΠϯτ AppRegistry.registerComponent('ReactQiita', () => ReactQiitaNavigator);
͜Ε·ͰͷNa#ve։ൃͱͷൺֱ • Reac&veʹॻ͘ํ๏RAC͘Β͍͔͠ແ͔ͬͨ • RAC*...*Reac&veCocoa
Reac%veCocoaͱͷൺֱ • ReactNa(veॻ͖ํ͕γϯϓϧ(ޙड़) • Na(veίʔυͱͷϒϦοδΛ࡞͢Δඞཁ͕͋Δ • iOSඪ४ͱൺͯɺσβΠϯཁૉͷهड़ָ͕ • Viewࣗମͷॻ͖ํָͩͱࢥ͏͕͜Ε·ͩϏϡʔ͕খ͍͞ ͔Βͩͱࢥ͏
RACͷॻ͖ํ ͷมߋΛݕ͢Δ͚ͩͰԼهͷΑ͏ͳهड़ɺ [[RACObserve(self, username) filter:^(NSString *newName) { return [newName hasPrefix:@"j"];
}] subscribeNext:^(NSString *newName) { NSLog(@"%@", newName); }];
ReactNa'veͷίί͕ྑ͍ • UIKitϕʔεʹίʔυͰϏϡʔΛهࡌ͢ΔΑΓָ • xibΑΓهड़͕ʢࠓͷͱ͜Ζʣָ • Reac-veͳهड़͕ඇৗʹগͳ͍ίʔυྔͰॻ͚Δ
ReactNa'veͷίί͕μϝ • fetchͳͲ͕ಠ࣮ࣗͬΆ͍ͷͰnpmͷࢿ࢈͕׆͔ͤΔ͔ • ݁ہUIKitͷֶशͷ্ʹReactNa1veͷಠࣗίϯϙʔωϯτͷֶ श͕ඞཁʹͳΔ • na1veͷϒϦοδRCTBridgeModuleʹै͏
࡞ͬͯͷײ • UIKitͱ͍͏͔iOS)SDKΒͳ͍ͱ࡞Εͳ͍ • ͦͷ্ʹReactjsͱReactNa2veͷ͕ࣝඞཁ • ݸਓతʹReac2veͳna2veΞϓϦ͜Ε͕Ұ൪࡞Γ͍͢ͱࢥ ͏ • iOSॻ͚ͯReactjs͔͚ΔਓҎ֎Θͳ͍ํ͕ྑͦ͞͏
• ܶతʹ։ൃΛϥΫʹ͢ΔͷͰͳ͍
࠷ޙʹ • ReactNa(veΫϩεϓϥοτϑΥʔϜͷͨΊͷΈ͡Όͳ͍ ʢͱࢥ͍ͬͯΔʣ • Reac(veͷจ຺Λ࣋ͪࠐΈͯ͘͘͢͠ΕΔSDK • ֤ϓϥοτϑΥʔϜͱReactͷ͕ࣝ͋ΕΑΓΑ͍։ൃ͕Մೳ
ָ͠Α͏ͱࢥ͏ͳΒ (Java|Swi)) ॻ͖·͠ΐ͏