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

Convert react-error-overlay to React #2100

Closed
gaearon opened this issue May 8, 2017 · 14 comments
Closed

Convert react-error-overlay to React #2100

gaearon opened this issue May 8, 2017 · 14 comments

Comments

@gaearon
Copy link
Contributor

gaearon commented May 8, 2017

It's currently pretty complicated. We should turn this into a separate package with a build step, and probably use React as a dependency instead of vanilla JS code.

We shouldn't have the "duplicate React" issue because it's technically inside an iframe and would get its own copy of React. So if I understand it right, they wouldn't share any state, and if React in the app breaks, the one in the overlay should not be affected.

This should also work if the main app stops depending on React.

@Timer
Copy link
Contributor

Timer commented May 8, 2017

So I went ahead and turned this into a separate package (and flow-type'd it) a while ago simply because it was virtually impossible to change things without breaking everything. See here.

The current copy in this repo is basically the rollup'd version of that package (which isn't published).

Switching it to React is viable now since we're using an iframe, but wasn't before since it wasn't in it's own frame. In hindsight, doing it in React probably would've been optimal but that was pre-iframe days.

@gaearon
Copy link
Contributor Author

gaearon commented May 8, 2017

Yea I was being silly for not thinking of this earlier.

Do you mind bringing your package into our monorepo?

@Timer
Copy link
Contributor

Timer commented May 8, 2017

Sure, we can do that. 😄

@gaearon gaearon modified the milestones: 0.10.0, 0.11.0 May 10, 2017
@gaearon
Copy link
Contributor Author

gaearon commented May 10, 2017

I think we should do this asap because it’s going to be tough to fix bugs as soon as this is out.

@gaearon
Copy link
Contributor Author

gaearon commented May 10, 2017

I’m cool with keeping it separate too if you would prefer that. Just need access to publishing.

@Timer
Copy link
Contributor

Timer commented May 10, 2017

The package(s) have been brought into this repo. 👍

@Timer Timer changed the title Modularize crashOverlay Convert react-error-overlay to React May 10, 2017
@gaearon gaearon modified the milestones: 0.11.0, 0.10.0 May 11, 2017
@gaearon
Copy link
Contributor Author

gaearon commented May 14, 2017

Let's do an equivalent of #2142 as part of that. I'll close that PR for now.

@tharakawj
Copy link
Contributor

tharakawj commented May 20, 2017

Is anyone working on this? If not, I would like to write some React code 😄

@gaearon
Copy link
Contributor Author

gaearon commented May 20, 2017

I don't think anyone started it yet. Please do!

@gaearon
Copy link
Contributor Author

gaearon commented May 20, 2017

The latest code lives in packages/react-error-overlay.

@tharakawj
Copy link
Contributor

Ok. Thanks!

@gaearon
Copy link
Contributor Author

gaearon commented May 20, 2017

Note that it has a build step (see its package.json).

@tharakawj
Copy link
Contributor

Noted!

@gaearon
Copy link
Contributor Author

gaearon commented Aug 28, 2017

Fixed in 645dc42.

@gaearon gaearon closed this as completed Aug 28, 2017
@gaearon gaearon modified the milestones: 1.0.12, 1.x Aug 28, 2017
@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants