How to add ZoomVideoSdkProvider?

we are using react-native-router-flux structure

App.js

import React, { useEffect } from "react";

import Root from "./src";

import configureStore from "./src/store";

const { persistor, store } = configureStore();

export default function App(props) {

return <Root store={store} persistor={persistor} />;

}

index.js

import React from "react";
import PropTypes from "prop-types";
import { Provider as PaperProvider } from "react-native-paper";
import { Provider } from "react-redux";
import { PersistGate } from "redux-persist/es/integration/react";
import { Root, StyleProvider } from "native-base";
import Routes from "./routes";
import Loading from "./widgets/loading";
import getTheme from "../native-base-theme/components";
import theme from "../native-base-theme/variables/platform";
import AsyncStorage from "@react-native-async-storage/async-storage";
import { connect } from "react-redux";
import global from "./global";

class App extends React.Component {
  constructor(props) {
    super(props);
    this.state = { loading: true };
  }

  async componentDidMount() {
    const result = await AsyncStorage.getItem("user");
    console.log("user detail => ", JSON.parse(result));
    if (result !== undefined && result !== null && result !== "") {
      const user = JSON.parse(result);
      console.log("user=>", user.user_id);
      global.AUTH_TOKEN = global.AUTH_TOKEN;
      global.EMAIL = user.email;
      global.PHONE_NUMBER = user.mobilenumber;
      global.COUNTRY_CODE = user.country_code;
      global.NAME = user.firstname;
      global.USER_ID = global.USER_ID;
      console.log(global.USER_ID);
    }
    this.setState({ loading: false });
  }

  resetError = () => {
    const { resetDoctorError, resetUserError } = this.props;
    resetDoctorError("");
    resetUserError("");
  };

  render() {
    const { loading } = this.state;
    const { store, persistor, defaultPath, apptId } = this.props;

    if (loading) {
      return <Loading />;
    }

    return (

      <Root>
        <Provider store={store}>
          <PaperProvider>
            <PersistGate loading={<Loading />} persistor={persistor}>
              <StyleProvider style={getTheme(theme)}>
                <Routes />
              </StyleProvider>
            </PersistGate>
          </PaperProvider>
        </Provider>
      </Root>
    );
  }
}

App.propTypes = {
  store: PropTypes.object.isRequired,
  persistor: PropTypes.object.isRequired,
};

const mapStateToProps = (state) => ({});

const mapDispatchToProps = (dispatch) => ({
  resetDoctorError: dispatch.doctor.updateError,
  resetUserError: dispatch.user.updateError,
});

export default connect(mapStateToProps, mapDispatchToProps)(App);

Hi there! Thanks for your post. I will look at this and see if I can figure out the issue.

Are you currently getting any errors?

thank you…for your reply…
i think issue on the react-native version…so I updated the version the issue is resolved

1 Like