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
Firebaseオンリー + React Nativeでアプリを作ると果たして簡単になるのか?
Search
Yu Watanabe
December 03, 2019
Technology
4
1.1k
Firebaseオンリー + React Nativeでアプリを作ると果たして簡単になるのか?
バックエンドをFirebaseにし、アプリをReact Nativeで作ると通常作るよりも簡単にできるのかについての発表となります。
Yu Watanabe
December 03, 2019
Tweet
Share
More Decks by Yu Watanabe
See All by Yu Watanabe
npm packageとリリースとモノレポ
watanabeyu
0
29
react-native-ffmpegを使って動画をいじくりmawasou
watanabeyu
0
690
react-native-unimodulesを用いてのApp内課金実装
watanabeyu
0
1k
gandhの紹介です
watanabeyu
0
26
XcodeやAndroid Studioを弄らないアイコン管理
watanabeyu
2
560
react-native-unimodulesのススメ
watanabeyu
1
6.2k
JavaScript製npmパッケージをTypeScriptで書き直した話
watanabeyu
0
990
React Native Expoで行うアプリの簡単最速運用
watanabeyu
0
300
読みやすいコードの書き方のススメ
watanabeyu
7
4.6k
Other Decks in Technology
See All in Technology
20240906_JAWS_Yamanashi_#1_leap_beyond_the_AWS_all_certifications
tsumita
1
130
Chunk computing
matyo91
0
270
標準最高!標準はださくないぞ! at fukuoka.ts #1
yoiwamoto
0
150
四国のあのイベントの〇〇システムを45日間で構築した話 / cloudohenro2024_tachibana
biatunky
0
110
Javaにおける関数型プログラミンへの取り組み
skrb
5
190
標準ライブラリの奥深アップデートを掘り下げよう!
logica0419
2
400
#Zenoh 完全に理解した 〜組込み純情篇〜
takasehideki
1
450
夏休みの(最後の)宿題 for JuliaTokyo #12
antimon2
0
130
エンジニア採用を起点に取り組む組織の改善活動と課題、中長期のタスク管理/ #HRmethod
nishiuma
4
3.3k
AWSを始めた頃に陥りがちなポイントをまとめてみた
oshanqq
1
1.9k
RAGHack: Kickoff and RAG 101
pamelafox
0
200
APIのドキュメント化何使ってますか?
miu_crescent
2
160
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
363
22k
Build The Right Thing And Hit Your Dates
maggiecrowley
29
2.2k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
27
7.4k
Raft: Consensus for Rubyists
vanstee
135
6.5k
No one is an island. Learnings from fostering a developers community.
thoeni
18
2.9k
Creatively Recalculating Your Daily Design Routine
revolveconf
215
12k
Why Our Code Smells
bkeepers
PRO
333
56k
How GitHub Uses GitHub to Build GitHub
holman
472
290k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
32k
Imperfection Machines: The Place of Print at Facebook
scottboms
263
13k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
24
2k
5 minutes of I Can Smell Your CMS
philhawksworth
201
19k
Transcript
2019/12/03 ΘͨͳΏ͏ FIREBASEΦϯϦʔ + REACT NATIVEͰ ΞϓϦΛ࡞ΔͱՌͨͯ͠؆୯ʹͳΔͷ͔ʁ
▸ ࣗݾհ ▸ ؆୯ʹͳͬͨͳͱײͨ͡෦ ▸ ਏ͔ͬͨ෦ ▸ ͨ͠෦ ▸ Ͳ͏͍͏ΞϓϦʹ͍ͯΔ͔
▸ ·ͱΊ ֓ཁ
ࣗݾհ(1) ΘͨͳΏ͏ ▸ ॴଐ ▸ גࣜձࣾg&h ▸ Web / ΞϓϦΛझຯͰެ։
▸ ࣄ༰ ▸ αʔό / ϑϩϯτ / ΞϓϦ / Web ▸ ΞΧϯτ ▸ Twitter : @hmktsu ▸ Github : @watanabeyu
ࣗݾհ(2) ▸ https://www.gandh.jp ▸ 5໊(ΤϯδχΞ2ਓ)Ͱฏۉྸ30ͪΐ͍ͷձࣾ ▸ ετϦʔτΧϧνϟʔ × ITͳαʔϏεΛӡӦ ▸
ࠓ࡞͍ͬͯΔࣄۀ ▸ ετϦʔτμϯεͷΦϯϥΠϯϨοεϯΞϓϦ ▸ react-native + firebase + TypeScript
FIREBASEΦϯϦʔ + REACT NATIVEͰΞϓϦΛ࡞ΔͱՌͨͯ͠؆୯ʹͳΔͷ͔ʁ ͍͖ͳΓ͚ͩͲ݁ ͍ͩͿ؆୯ʹͳͬͨؾ͕͢Δ
Ͳ͕͜؆୯ʹͳͬͨͷ͔ʁ(1) ʙೝূ෦ʙ ▸ AuthenticationΛ͏͜ͱͰϢʔβ෦Λ·Δ·ΔεΩοϓ ▸ ϝʔϧΞυϨε֬ೝػೳ ▸ ύεϫʔυมߋػೳ ▸ ࣗಈૹ৴ϝʔϧΛݴޠ͝ͱʹมߋՄೳ
Ͳ͕͜؆୯ʹͳͬͨͷ͔ʁ(2) ʙσʔλ෦ʙ ▸ Firestore͔ΒσʔλΛऔಘ ▸ ϧʔϧͷมͱͯ͠authͳͲ͑ΔͷͰ੍ݶ͕؆୯ ▸ FirestoreΛτϦΨʔͱͯ͠FunctionsΛىಈͤͯ͞ͷσʔλཧ ▸ ΞϓϦweb΄΅΄΅ڞ௨Ͱσʔλऔಘ༻͕ؔॻ͚Δ
Ͳ͕͜؆୯ʹͳͬͨͷ͔ʁ(3) ʙͦͷଞʙ ▸ όοΫΤϯυΛ༻͍Δඞཁ͕ͳ͔ͬͨ ▸ ཧը໘͕ॆ࣮͍ͯ͠ΔͳͲͳͲ
FIREBASEΦϯϦʔ + REACT NATIVEͰΞϓϦΛ࡞ΔͱՌͨͯ͠؆୯ʹͳΔͷ͔ʁ ͱ͍͑Ͳਏ͍෦͋Γ
Ͳ͕͜ਏ͔ͬͨͷ͔ʁ ▸ AuthenticationͰ࣋ͯΔใݶΒΕΔ ▸ id,email,displayName, photoUrl,emailVerified,֤छϓϩύΠμ ▸ FirestoreʹσʔλΛͦͷ··ೖΕΔ͜ͱ͕Ͱ͖ΔͷͰɺ ϑϩϯτଆͷόϦσʔγϣϯΛ͔ͬ͠Γͱ͠ͳ͍ͱ͍͚ͳ͍ ▸
ϧʔϧΛશһ͕ͪΌΜͱѲ͍ͯ͠Δ͔ ▸ Firestore͋͘·ͰNoSQLతͳ෦ྨͳͷͰݕࡧڧ͘ͳ͍ ▸ ίϨΫγϣϯ͕૿͑ΔͱτϦΨʔͷѲ͕໘ʹ ▸ ίϨΫγϣϯ͕૿͑Δͱ͍Δͷ͔͍Βͳ͍ͷ͔͕͘͠ͳΔ ▸ ෳϦϙδτϦʹލͬͨ߹ͷFunctionsͷཧํ๏ ▸ ͳͲͳͲ…
FIREBASEΦϯϦʔ + REACT NATIVEͰΞϓϦΛ࡞ΔͱՌͨͯ͠؆୯ʹͳΔͷ͔ʁ ͜͏͍͏Λ͠·ͨ͠
Ͳ͏͍͏Λ͔ͨ͠ʁ(1) ▸ TypeScriptͰFirestoreͷίϨΫγϣϯͷܕΛͪΌΜͱཧ ▸ ݕࡧ݁ՌΛ͋Β͔͡Ίอଘ͓ͯ͘͠ ▸ HIPHOPʹؔ͢ΔϨοεϯΛอଘ͓ͯ͘͠υΩϡϝϯτΛ༻ҙͳͲ ▸ NoSQLͱ͍͏͜ͱΛ಄ʹೖΕͯίϨΫγϣϯͳͲΛ࡞ ▸
τϦΨʔͳͲؔ࿈ੑΛͪΌΜͱਤʹॻ͍ͯѲ
Ͳ͏͍͏Λ͔ͨ͠ʁ(2) ▸ AdminͰ͍͍ͨɺΞϓϦͰ͍͍ͨɺ WebͰ͍͍ͨΑ͏ͳ FunctionsͦΕͧΕͷϦϙδτϦʹׂͯ͠ཧ ▸ exports͢ΔؔΛΦϒδΣΫτʹ͢Δ $ firebase deploy
--only functions:admin exports.admin = { func1: require(“./func1”), func2: require(“./func2”), };
FIREBASEΦϯϦʔ + REACT NATIVEͰΞϓϦΛ࡞ΔͱՌͨͯ͠؆୯ʹͳΔͷ͔ʁ ͜͏͍ͬͨΞϓϦͩͱ࠾༻͠ͳ͔͔ͬͨ
͜͏͍͏ΞϓϦͩͱ࠾༻͠ͳ͔͔ͬͨ ▸ SNSͷΑ͏ͳϦϨʔγϣϯ͕ෳࡶʹབྷΈ߹͏Α͏ͳαʔϏε ▸ firestorefunctions͕ೖΓཚΕͯ͠·͏ͨΊ ▸ ݕࡧ͕݅ෳࡶͩͬͨΓ͢ΔΑ͏ͳαʔϏε ▸ ෳ߹ΠϯσοΫεશจݕࡧͷͨΊʹalgoliaಋೖͳͲ͕໘ ▸
ήʔϜͷΑ͏ͳεϐʔυΛॏཁࢹ͍ͨ͠αʔϏε ▸ τϥϯβΫγϣϯॻ͖ࠐΈ͕ωοΫͱͳΔͷͰ ͖ෆ͖͕͋ΔͷͰཁҙ
FIREBASEΦϯϦʔ + REACT NATIVEͰΞϓϦΛ࡞ΔͱՌͨͯ͠؆୯ʹͳΔͷ͔ʁ ·ͱΊ
·ͱΊ ▸ ඇSNSΞϓϦͰ؆୯ʹͳΔͷͰ͓͢͢Ί ▸ ୯७ʹίϨΫγϣϯ͔Βऔಘ͢ΔΑΓɺ ݕࡧ݁ՌΛ·ͱΊͨυΩϡϝϯτΛ༻ҙ͓ͯ͘͠ͱΤίͰָ ▸ τϦΨʔىಈͷFunctionsͳͲ͕େྔʹઃஔ͞ΕΔՄೳੑ͕ߴ͍ͷͰɺ ͔ͬ͠ΓͱؔੑΛཧͰ͖ΔΑ͏ͳֆΛඳ͘ ▸
ຊLTͰհ͍ͯ͠ͳ͍͕ɺFCMΞφϦςΟΫεͳͲΞϓϦΛ࡞Δ্ Ͱඞཁͳͷ͕શͯἧ͍ͬͯΔ ࡞Γ͍ͨͷʹΑΔ͕ গਓͰͺͺͬͱ։ൃΛ͢ΔͳΒ!
͓ΘΓ