-
Notifications
You must be signed in to change notification settings - Fork 408
Unable to set a region with useFunctions() #267
Answered
by
elliotcw
jeff-kroot
asked this question in
Q&A
-
Currently, we have to do the following to specify the region with useFunctions():
const functions = useFunctions(); functions.region_ = 'europe-west1';
This does not seem like the way it should work (also seeing it's undocumented).
Maybe something like the following:
const functions = useFunctions('europe-west1'); // or const functions = useFunctions()('europe-west1'); // or const functions = useFunctions({ region: 'europe-west1'});
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
Answered by
elliotcw
Oct 19, 2020
This fix has changed as of around "firebase": "^7.24.0",. _region has change to just region.
const functions = useFunctions();
functions.region = 'europe-west1';
Replies: 1 comment 2 replies
-
This fix has changed as of around "firebase": "^7.24.0",. _region has change to just region.
const functions = useFunctions();
functions.region = 'europe-west1';
Beta Was this translation helpful? Give feedback.
All reactions
2 replies
-
Is there a way to do this globally?
Beta Was this translation helpful? Give feedback.
All reactions
-
You can export your own hook.
// app/hooks.ts
export const useAppFunctions = () => getFunctions(useFirebaseApp(), 'europe-west1');
Beta Was this translation helpful? Give feedback.
All reactions
Answer selected by
jamesdaniels
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment