I'm trying to integrate zoom into the app. I remove the useEffect below and build the app, then when I add the useEffect it works fine and I see the version number on screen. But when I build the application without removing the useEffect, I get the following error. What do you think is caused by this situation?
App.js
import * as React from 'react';
import { ZoomVideoSdkProvider } from '@zoom/react-native-videosdk';
import IntroScreen from './src/screens/intro-screen/intro-screen';
export default function App() {
return (
<ZoomVideoSdkProvider
config={{
// appGroupId: '',
domain: 'zoom.us',
enableLog: true,
}}
>
<IntroScreen />
</ZoomVideoSdkProvider>
);
}
IntroScreen.js
import React, { useEffect, useState } from 'react';
import { View, Text } from 'react-native';
import { useZoom } from '@zoom/react-native-videosdk';
function VersionNumber() {
const [version, setVersion] = useState('0');
const zoom = useZoom();
////////////
useEffect(() => {
zoom.getSdkVersion().then((v) => setVersion(v));
}, [zoom]);
////////////
return <Text>Version: {version} </Text>
}
export default function IntroScreen({ navigation }) {
return (
<View style={{ flex: 1 }}>
<VersionNumber></VersionNumber>
</View>
);
}