Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: The WKWebView was invalidated #44

Open
robertcreaner opened this issue Jul 9, 2019 · 1 comment
Open

Error: The WKWebView was invalidated #44

robertcreaner opened this issue Jul 9, 2019 · 1 comment

Comments

@robertcreaner
Copy link

Getting the following error any time I create an event: Error: The WKWebView was invalidated

Env:
"dependencies": {
"expo": "^33.0.0",
"expo-web-browser": "^5.0.3",
"react": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
},

@robertcreaner
Copy link
Author

robertcreaner commented Jul 15, 2019

For anyone else who might be experiencing this, I fixed it by creating a single instance of Analytics and passing it to the rest of my components using Context:

In my App.js:
const analytics = new Analytics(AppConfig.googleAnalyticsKey); <SocketContext.Provider value={{ analytics : analytics}}> <RootContainer /> </SocketContext.Provider>

In my other components:
const RootContainer = props => ( <Context.Consumer> {context => ( <ConnectedRootContainer {...props} analytics={context.analytics} /> )} </Context.Consumer> ); export default RootContainer;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant