@bugsnag/react-router-performance
TypeScript icon, indicating that this package has built-in type declarations

2.7.1 • Public • Published

@bugsnag/react-router-performance

A react router integration for BugSnag performance

Usage

import BugsnagPerformance from '@bugsnag/browser-performance'
import { ReactRouterRoutingProvider } from '@bugsnag/react-router-performance'

const basename = '/my-app'

const routes = [
    {
        path: '/',
        element: <Root />,
        children: [
          {
              path: 'contacts/:contactId',
              element: <Contact />,
          },
        ]
    },
]

// basename can be omitted if your application is served from the root
const router = createBrowserRouter(routes, { basename })

BugsnagPerformance.start({
    apiKey,
    routingProvider: new ReactRouterRoutingProvider(routes, basename)
})


ReactDOM.createRoot(document.getElementById('root')).render(
  <React.StrictMode>
    <RouterProvider router={router} />
  </React.StrictMode>,
)

Readme

Keywords

none

Package Sidebar

Install

npm i @bugsnag/react-router-performance

Weekly Downloads

128

Version

2.7.1

License

MIT

Unpacked Size

5.05 kB

Total Files

9

Last publish

Collaborators

  • joshedney
  • ahmed_bugsnag
  • gingerbenw
  • bullmo
  • foygl
  • djskinner
  • tomlongridge
  • imjoehaines
  • twometresteve