[SOLVED] Is there any way to wait App.js to render in Moralis Provider

my react code of index.js is

import {MoralisProvider} from "react-moralis";
import config from './config/constants.json';
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
    <React.StrictMode>
        <MoralisProvider serverUrl={config.serverUrl} appId={config.appId} initializeOnMount={false}>
            <Router>
                <App/>
            </Router>
        </MoralisProvider>
    </React.StrictMode>
);

that cause my useEffect of App.js renders twice, may be its due to load provider later
How can i implement conditional rendering on App.js after identify moralis provider loads
@cryptokid can you please help to figure out this.

useEffect running twice is due to StrictMode. You can check out this issue regarding that.

Having initializeOnMount set to false, you’ll have to call initialize later to get your project initialized

@qudusayo
i tried initializeOnMount set to false but it still not working

Try it in production and not in dev to see if there is a difference.

Or remove that strict mode temporarily.

yes its working after removing strict mode