Using highlight.io with React.js
Install the npm package
highlight.run in your terminal.
Grab your project ID from app.highlight.io/setup, and pass it as the first parameter of the
To get started, we recommend setting
networkRecording so that we can pass a header to pair frontend and backend errors. Refer to our docs on SDK configuration and Fullstack Mapping to read more about these options.
The ErrorBoundary component wraps your component tree and catches crashes/exceptions from your react app. When a crash happens, your users will be prompted with a modal to share details about what led up to the crash. Read more here.
Identify users after the authentication flow of your web app. We recommend doing this in any asynchronous, client-side context.
The first argument of
identify will be searchable via the property
identifier, and the second property is searchable by the key of each item in the object.
The next step is instrumenting your backend to tie logs/errors to your frontend sessions. Read more about this in our backend instrumentation section.