Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
990
読みやすいコード クラスメソッド 2022 年度新卒研修
januswel
1
9.8k
Accelerate your business with React Native
januswel
0
2.6k
猫の手も借りたい引っ張りだこ企業による LINE API活用事例発表会! クラスメソッド編
januswel
0
220
現状確認
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
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
560
個人開発基盤をまるごとCloudflareに引っ越して爆速で総合的体験を向上させた話
tinykitten
0
210
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.5k
JRuby: Past, Present, and Future
headius
0
210
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
180
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
1
1.9k
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
460
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
180
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
220
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
150
App Intentsのビルドプロセスを支える技術
kntkymt
0
460
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
140
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
290
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Prompt Engineering for Job Search
mfonobong
0
460
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
200
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
Building the Perfect Custom Keyboard
takai
2
890
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
470
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/