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

Better DX (fix hot reload, better log) #11

Merged
merged 1 commit into from May 5, 2018

Conversation

Projects
None yet
2 participants
@slorber
Contributor

slorber commented Aug 10, 2017

I've spent some time figuring out why my integration did not work.

I think it's worth documenting the Sentry.enableInExpoDevelopment=true attribute because I actually expected this to work in dev too.

Also worth mentioning that if we set Sentry.config = noop like it did, in case someone does hot reload the code and it calls Sentry.config().install() again, it produces "can't call install() on undefined" errors due to hot reload. My code fixes this issue as it replaces config fn with a better mock in case Sentry is supposed to be disabled. Also notice it ensures that on hot reload we only log once.

Better DX (fix hot reload, better log)
I've spent some time figuring out why my integration did not work.

I think it's worth documenting the `Sentry.enableInExpoDevelopment=true` attribute because I actually expected this to work in dev too.

Also worth mentioning that if we set Sentry.config = noop like it did, in case someone does hot reload the code and it calls `Sentry.config().install()` again, it produces "can't call install() on undefined" errors due to hot reload. My code fixes this issue as it replaces config fn with a better mock in case Sentry is supposed to be disabled

@brentvatne brentvatne merged commit bea112d into expo:master May 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment