From 3ef361ee5afd941573df151e7c77f2c96c9f01c2 Mon Sep 17 00:00:00 2001 From: Subramanian Elavathur <4240966+subramanian-elavathur@users.noreply.github.com> Date: Thu, 6 Jun 2024 18:11:52 +0530 Subject: [PATCH] docs(functions): highlight region-specific usage of useEmulator (#7811) --- docs/functions/usage/index.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/functions/usage/index.md b/docs/functions/usage/index.md index d7d61a3480..a7f5a1307b 100644 --- a/docs/functions/usage/index.md +++ b/docs/functions/usage/index.md @@ -51,7 +51,7 @@ To learn more about deploying Functions to Firebase, view the [Writing & Deployi Whilst developing your application with Cloud Functions, it is possible to run the functions inside of a local emulator. -To call the emulated functions, call the `useEmulator` method exposed by the library: +To call the emulated functions in the **default** region, call the `useEmulator` method exposed by the library: ```js import functions from '@react-native-firebase/functions'; @@ -59,10 +59,12 @@ import functions from '@react-native-firebase/functions'; // Use a local emulator in development if (__DEV__) { // If you are running on a physical device, replace http://localhost with the local ip of your PC. (http://192.168.x.x) - firebase.functions().useEmulator('localhost', 5001); + functions().useEmulator('localhost', 5001); } ``` +If your functions are deployed on a different region, then please see [Region-specific Functions](#region-specific-functions) + ## Calling an endpoint Assuming we have a deployed a callable endpoint named `listProducts`, to call the endpoint the library exposes a