-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Completely isolate the error overlay script from the main app #3120
Comments
@tharakawj Thoughts? |
Technically this sounds possible though we have to figure it out how to do it. Also, I'm not sure parsing React code each time when we create a new iframe, will have any performance impact. Let me try some experiments around this and get back to you. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I’m worried that if we add duplicate React detection (e.g. facebook/react-devtools#714), it will start firing in CRA development mode because
react-error-overlay
might ship with its own copy of React (e.g. if the app user deletes React but then adds an incompatible version). I’d like to avoid warning in such cases because it is intentional, and the iframe is meant to be completely opaque to the app developer.I wonder if we can package the error overlay code in a way that it bundles React (rather than just importing it via CommonJS) and executes it in the context of the iframe (e.g. via
iframeWindow.eval
). Then DevTools shouldn’t “see“ React there.Does this make any sense?
The text was updated successfully, but these errors were encountered: