Skip to content

Commit e8a7116

Browse files
docs(functions): show how to use region-specific function (#6993)
Co-authored-by: Mike Hardy <[email protected]>
1 parent bcc1a49 commit e8a7116

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/functions/usage/index.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,17 @@ function App() {
103103
// ...
104104
}
105105
```
106+
107+
## Region-specific Functions
108+
109+
If you need to deploy Functions in a region other than the default one, modified statements need to be used.
110+
111+
```javascript
112+
import { firebase } from '@react-native-firebase/functions';
113+
114+
// Emulator statement
115+
firebase.app().functions('region_name').useEmulator('localhost', 5001);
116+
117+
// function calling statement
118+
firebase.app().functions('region_name').httpsCallable('listProducts')({ abc: 123 }).then();
119+
```

0 commit comments

Comments
 (0)