Skip to content

Commit f6f18aa

Browse files
authored
point to setup instructions for providers (#460)
1 parent 3f07cba commit f6f18aa

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

docs/use.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ function FirebaseComponents({ children }) {
8888

8989
Some products benefit from asynchronous initialization. For that, ReactFire has hooks like `useInitFirestore` and `useInitRemoteConfig`. Learn more about these in the individual product sections below.
9090

91+
If you _don't_ set up a provider for a Firebase product SDK, you'll receive the following error:
92+
93+
```
94+
SDK not found. useSdk must be called from within a provider
95+
```
96+
9197
### Connect to the Firebase Local Emulator Suite
9298

9399
Connect a product SDK to the emulator before passing it to a provider. For example, to connect to the Auth and Realtime Database emulators:
@@ -158,7 +164,7 @@ See the [App Check setup guide in the Firebase docs](https://firebase.google.com
158164

159165
## Auth
160166

161-
The following samples assume that `FirebaseAppProvider` and `AuthProvider` components exist higher up the component tree.
167+
The following samples assume that `FirebaseAppProvider` and `AuthProvider` components exist higher up the component tree (see [setup instructions](#setup) for more detail).
162168

163169
### Display the current signed-in user
164170

@@ -217,7 +223,7 @@ const { status, data: signInCheckResult } = useSignInCheck({
217223

218224
## Cloud Firestore
219225

220-
The following samples assume that `FirebaseAppProvider` and `FirestoreProvider` components exist higher up the component tree.
226+
The following samples assume that `FirebaseAppProvider` and `FirestoreProvider` components exist higher up the component tree (see [setup instructions](#setup) for more detail).
221227

222228
### Access data offline
223229

@@ -303,7 +309,7 @@ function FavoriteAnimals() {
303309

304310
## Cloud Functions
305311

306-
The following samples assume that `FirebaseAppProvider` and `FunctionsProvider` components exist higher up the component tree.
312+
The following samples assume that `FirebaseAppProvider` and `FunctionsProvider` components exist higher up the component tree (see [setup instructions](#setup) for more detail).
307313

308314
### Call a function based on user interaction
309315

@@ -342,7 +348,7 @@ function LikeCount({ videoId }) {
342348

343349
## Realtime Database
344350

345-
The following samples assume that `FirebaseAppProvider` and `RealtimeDatabaseProvider` components exist higher up the component tree.
351+
The following samples assume that `FirebaseAppProvider` and `RealtimeDatabaseProvider` components exist higher up the component tree (see [setup instructions](#setup) for more detail).
346352

347353
### Show an object
348354

@@ -389,7 +395,7 @@ function AnimalsList() {
389395

390396
## Cloud Storage for Firebase
391397

392-
The following samples assume that `FirebaseAppProvider` and `StorageProvider` components exist higher up the component tree.
398+
The following samples assume that `FirebaseAppProvider` and `StorageProvider` components exist higher up the component tree (see [setup instructions](#setup) for more detail).
393399

394400
### Fetch and show an image
395401

@@ -429,7 +435,7 @@ function UploadProgress({ uploadTask, storageRef }) {
429435

430436
## Remote Config
431437

432-
The following samples assume that `FirebaseAppProvider` and `RemoteConfigProvider` components exist higher up the component tree.
438+
The following samples assume that `FirebaseAppProvider` and `RemoteConfigProvider` components exist higher up the component tree (see [setup instructions](#setup) for more detail).
433439

434440
### Initialize, fetch, and activate
435441

0 commit comments

Comments
 (0)