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

[PLAT-5010]: Create React Navigation plugin #1067

Merged
merged 10 commits into from
Oct 2, 2020

Conversation

bengourley
Copy link
Contributor

@bengourley bengourley commented Sep 23, 2020

This PR adds a plugin that integrates with React Navigation.

The new plugin hooks in to onStateChange events to perform the following actions:

  • Sets context so that when an error happens, so the developer can immediately see which screen it happened on
  • Leaves breadcrumbs, so the developer can see what navigation events preceeded an error

Note, end to end tests to follow in separate PRs as it requires a significant amount of @bugsnag/platforms-test-automation input.

@bugsnagbot
Copy link
Collaborator

bugsnagbot commented Sep 23, 2020

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 40.57 kB 12.52 kB
After 40.57 kB 12.52 kB
± No change No change

Generated by 🚫 dangerJS against 738a295

@bengourley bengourley force-pushed the bengourley/react-navigation-plugin branch from a65f161 to dd57e42 Compare September 24, 2020 09:25
@bengourley bengourley marked this pull request as ready for review September 24, 2020 09:36
@bengourley bengourley requested a review from a team as a code owner September 24, 2020 09:36
Copy link
Contributor

@twometresteve twometresteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No comments from a test pespective.

@imjoehaines imjoehaines merged commit 34a2bba into next Oct 2, 2020
@imjoehaines imjoehaines deleted the bengourley/react-navigation-plugin branch October 2, 2020 16:11
@djskinner djskinner mentioned this pull request Oct 8, 2020
@cristianoccazinsp
Copy link

Just curious, what happens with this change if we were already leaving breadcrumbs and setting context? Are we going to end up with duplicate logs? Should be listed as a breaking change if so.

@imjoehaines
Copy link
Contributor

imjoehaines commented Oct 13, 2020

Just curious, what happens with this change if we were already leaving breadcrumbs and setting context? Are we going to end up with duplicate logs? Should be listed as a breaking change if so.

This plugin has to be installed manually (it doesn't get pulled in automatically by @bugsnag/react-native) so it won't interfere with your custom context/breadcrumbs if you don't install it 🙂

If you'd like to migrate to using the plugin instead of your custom solution, the docs are here

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

Successfully merging this pull request may close these issues.

5 participants