import React, { useState } from 'react'; import { Button, Text, View, ScrollView } from 'react-native'; import { getApp } from '@react-native-firebase/app'; import { getFunctions, connectFunctionsEmulator, httpsCallable, } from '@react-native-firebase/functions'; const functions = getFunctions(); connectFunctionsEmulator(functions, 'localhost', 5001); export function HttpsCallableTestComponent(): React.JSX.Element { const [responseData, setResponseData] = useState(''); const handleCallFunction = async (): Promise => { try { const functionRunner = httpsCallable( getFunctions(getApp()), 'testFunctionDefaultRegionV2', ); const response = await functionRunner([1, 2, 3, 4, null, { yo: 1, nooo: null }]); setResponseData(JSON.stringify(response.data, null, 2)); } catch (e) { console.error(e); } }; return ( Ensure Emulator is running!!