on-internet
← Community

Jest TypeError: Cannot read property of null

Stack Overflow ·

I have a setup for an external application and start it within a const, then put it in the const allowAppInstance the configuration of the appConfig export const setupRemote = () => { if (isRemoteAvailable) { try { ... const allowAppInstance = SetupConfig.start(remoteInstance); return { allowAppInstance, }; } catch (e) { console.error(e); } } }; here I export export const appSetupConfig = () => setupRemote().allowAppInstance; in the component, I get this setup and put it in a const import { appSetupConfig } from '.../myapp' useEffect(() => { const allowAppInstance = appSetupConfig(); ...the re

Comments

Sign in or sign up to comment and upvote.

No comments yet.