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
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
wkhtmltopdfの次どうするか問題2026
willnet
2
1.8k
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
130
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
190
Java 27新機能 / Java 27 new features
kishida
2
180
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
7
5.1k
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
230
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
220
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
420
Are APIs Still Relevant in the AI Era?
soyuka
0
360
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
330
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
180
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
420
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
430
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
290
Crafting Experiences
bethany
1
360
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
A Soul's Torment
seathinner
8
3.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Everyday Curiosity
cassininazir
0
330
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.1k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
250
Raft: Consensus for Rubyists
vanstee
142
7.7k
First, design no harm
axbom
PRO
2
1.3k
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/