Lesson 5 - React Native Firebase_v2
Lesson 5 - React Native Firebase_v2
(REACT – NATIVE)
Ths. Trần Văn Hữu
Email: [email protected]
Mobile: 0913131732
3
REACT NATIVE FIREBASE
4
Prerequisites
Note:
React Native Firebase cannot be used in the "Expo
Go" app, because it requires custom native code.
5
Generate native projects in Expo
6
Create a new Firebase project
7
Android Setup
8
Create a new Firebase project
9
Create a new Firebase project
10
Generate native projects in Expo
11
Create a new Firebase project
13
Installation
14
Types of Firebase
Authentication
RealTime Database
Firestore Database
Storage
15
Authentication
Installation
16
Authenticate with Email and Password
17
Authenticate with Email and Password
18
Create User With Email And Password
19
Login With Email And Password
20
Forgot Password with Email
21
Sign in with Google
Installation
npm install @react-native-google-signin/google-signin
For IOS:
cd ios/ && pod install
22
Authenticate with Google
23
Authenticate with Google
24
Authenticate with Google
25
Sign in with Google
26
Cloud Firestore
Installation
npm install @react-native-firebase/firestore
For IOS:
cd ios/ && pod install
27
Cloud Firestore
Collections
Documents
28
Cloud Firestore
Collections
29
Cloud Firestore
30
Cloud Firestore
31
Cloud Firestore
One-time read
Realtime changes
Realtime changes via the onSnapshot method
32
Cloud Firestore
QuerySnapshot is a QueryDocumentSnapshot.
which allows you to access specific information
about a document
33
Cloud Firestore
34
Cloud Firestore
Filtering
To filter documents within a collection using
where method
35
Cloud Firestore
Filter.and()
36
Cloud Firestore
Filter.and()
37
Cloud Firestore
Filter.or()
38
Cloud Firestore
Limiting
39
Cloud Firestore
Ordering
40
Cloud Firestore
Adding documents
41
Cloud Firestore
Adding documents
42
Cloud Firestore
Updating documents
43
Cloud Firestore
Removing data
44