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 エンジニアのための React Native 入門
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
januswel
August 08, 2016
Programming
3.3k
15
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React エンジニアのための React Native 入門
januswel
August 08, 2016
More Decks by januswel
See All by januswel
今日からできる環境カイゼン
januswel
0
960
読みやすいコード クラスメソッド 2022 年度新卒研修
januswel
1
9.8k
Accelerate your business with React Native
januswel
0
2.5k
猫の手も借りたい引っ張りだこ企業による LINE API活用事例発表会! クラスメソッド編
januswel
0
210
現状確認
januswel
0
1k
BLE on React Native
januswel
2
1.6k
polyglot になろう !!
januswel
1
6.2k
React Native & monorepo
januswel
0
1.2k
What is React Native?
januswel
1
1.3k
Other Decks in Programming
See All in Programming
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
180
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
150
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
180
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
3.1k
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
0
120
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
360
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
280
霧の中の代数的エフェクト
funnyycat
1
430
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
0
180
テーブルをDELETEした
yuzneri
0
110
AI がコードを書く時代における新卒エンジニアの仕事風景 (2026) / New Graduate Engineers in the Era of AI Coding (2026)
sushichan044
0
240
Featured
See All Featured
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
910
For a Future-Friendly Web
brad_frost
183
10k
Ruling the World: When Life Gets Gamed
codingconduct
0
290
Building the Perfect Custom Keyboard
takai
2
820
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
310
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Are puppies a ranking factor?
jonoalderson
1
3.7k
Amusing Abliteration
ianozsvald
1
240
Exploring anti-patterns in Rails
aemeredith
3
450
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Building Adaptive Systems
keathley
44
3.1k
Crafting Experiences
bethany
1
230
Transcript
React エンジニアのための React Native 入門 2016/08/08 Node 学園 22 時限目
by janus_wel
しゃべるひと janus_wel やぬす tech lead@CureApp iOS, Android ともにネイティブ経験あり React Native
を product 投入中 シン・ ゴジラこれから 世界樹の迷宮 5 もこれから : janus_wel : januswel
None
LT のゴー ル before React を使ってアプリを作れる after React Native を使ってアプリを作りたくなる
※ 時間がないのでかけあしです ※ 実際に作る際に必要になるだろう資料は最後に紹介します
React Native ? Facebook 製モバイルアプリ用フレー ムワー ク 今年 4 月に
Windows10, Tizen 対応を発表 Microsoft と Samsung を巻きこんで https://techcrunch.com/2016/04/13/facebooks-react- native-open-source-project-gets-backing-from- microsoft-and-samsung/ 要するに本気 最近安定しつつ、 こなれてきている
React Native ? 2 週間ていどで新バー ジョンがリリー スされている バー ジョン リリー
ス日 0.31.0 08/05 0.30.0 07/24 0.29.0 07/06 少しずれることもある 使えるコンポー ネントが増えたり ow のバー ジョンがあがって 型チェックできる領域が増えたりする
React Native のうれしい点
Learn once, write anywhere React の考え方でモバイルアプリを作成できる JSX ・ 仮想 DOM
でビュー を記述 コンポー ネント指向 CSS の感覚でコンポー ネントを配置できる exbox でマルチデバイス対応もばっちり position + top | bottom + left | right も問題なし ux 系ライブラリー もそのまま使える ow による型チェックにも対応
// ロゴコンポー ネントの実装 import React from 'react' import { Image,StyleSheet,Text,View
} from 'react-native' const styles = StyleSheet.create({ container: { flexDirection: 'row', alignItems: 'center', padding: 32, }, text: { fontSize: 32, }, }) export default class Logo extends React.Component { render() { return ( <View style={styles.container}> <Image source={{uri: 'icon'}} /> <Text style={styles.text}> 東京 Node 学園 {this.props.classes} 時限目 </Text> </View> ) ) }
開発速度が速い 再コンパイル不要 ネイティブ開発と違いソー スを書き換えても再コンパイ ルが走らない 専用 bundler が該当箇所をバンドルしなおすだけ Universal JS
な npm の資産は使える !! ネイティブ API を知らなくてもなんとかなる 最近公式ドキュメントが丁寧になってきた ネイティブ側のドキュメントも参考になる
デバイスの機能が使える ブリッジ経由でネイティブの機能を呼び出せる カメラ Bluetooth 位置情報 加速度センサー etc... たいていの機能は標準サポー トもしくは定番がある
ブリッジ ? React Native では JavaScript からネイティブを、 ネイティブから JavaScript を、
ブリッジ経由で相互に呼び出し可能 標準提供の機能・ コンポー ネントはほとんどがネイテ ィブコー ドを呼び出している おかげで実行速度がボトルネックになりにくい
ブリッジの詳細については… Bridging in React Native http://tadeuzagallo.com/blog/react-native-bridge/ Facebook の中のひとによるブリッジの解説記事 [ 翻訳]
Bridging in React Native http://qiita.com/janus_wel/items/93de843cc224337 0fce4 ↑ 日本語訳 Objective-C の知識も必要なのでじっくりどうぞ
マルチプラットフォー ム import MyPackage from './my-package' このように書くとプラットフォー ムごとに適切なファ イルを読んでくれる プラットフォー
ム ファイル名 iOS ./my-package.ios.js Android ./my-package.android.js iOS では <TabBarIOS> を、 Android では <ToolBarAndroid> を使うといったことが可能
まとめ React Native は 1. ほぼ React そのままなので学習コストが低い 2. コンパイル不要
& 既存資産使用で開発速度が速い 3. ブリッジのおかげでデバイスの機能を使える 実行速度が担保されているので UI に影響が出に くい 4. 拡張子で切り分けることでマルチプラットフォー ム対応
その他、 参考になる資料
React Native 公式ドキュメント https://facebook.github.io/react-native/docs/getting- started.html まず真っ先に確認すべき資料 1. Getting Started 2.
Tutorial 3. コンポー ネント一覧を眺めつつやりたいことのイ メー ジをつかむ
React Native Non-React Tips http://qiita.com/janus_wel/items/d3c5b695015cb54344ff はじめるにあたって必要な React 以外の知識詰め合わせ React Native
で development, staging, production など環境を切り替える http://qiita.com/janus_wel/items/750ffd1ae912e67d7df8 Bitrise と DeployGate で React Native アプリの評価 環境を構築する http://qiita.com/janus_wel/items/83996325920f62a684eb ステー ジング環境アプリの配布自動化
マルチプラットフォー ム時代の JavaScript x React 戦略 https://speakerdeck.com/januswel/marutipuratutohuomushi- dai-false-javascript-x-react-zhan-lue マルチプラットフォー ム対応するならもやっと考えたいこと
React Native 製アプリ https://github.com/builderscon/session-timer/ Builderscon session timer
謝辞 power-assert React Native 対応 https://twitter.com/t_wada/status/748731657478287360 翻訳時に textlint https://textlint.github.io/ スライド作成に
Marp https://yhatt.github.io/marp/