You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/use.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,8 @@
14
14
*[Show a single document](#show-a-single-document)
15
15
*[Show a list of data (collection)](#show-a-list-of-data-collection)
16
16
-[Cloud Functions](#cloud-functions)
17
-
*[Call a function](#call-a-function)
17
+
*[Call a function based on user interaction](#call-a-function-based-on-user-interaction)
18
+
*[Call a function on render](#call-a-function-on-render)
18
19
-[Realtime Database](#realtime-database)
19
20
*[Show an object](#show-an-object)
20
21
*[Show a list of data](#show-a-list-of-data)
@@ -304,7 +305,7 @@ function FavoriteAnimals() {
304
305
305
306
The following samples assume that `FirebaseAppProvider` and `FunctionsProvider` components exist higher up the component tree.
306
307
307
-
### Call a function
308
+
### Call a function based on user interaction
308
309
309
310
```jsx
310
311
functionCalculator() {
@@ -327,6 +328,18 @@ function Calculator() {
327
328
}
328
329
```
329
330
331
+
### Call a function on render
332
+
333
+
If you want to call a function when a component renders, instead of in response to user interaction, you can use the `useCallableFunctionResponse` hook.
0 commit comments