A comprehensive bug tracking tool tailored for React, ensuring that no UI bug goes unnoticed!
- Install Dependency
npm i ui-bug-tracker
import BugReporter from "ui-bug-tracker";
// pass server endpoint where you need to store the bug report
const report = new BugReporter("https://your-api-endpoint.com/report", window, {
platform: "react",
env: "PRODUCTION/DEVELOPMENT/STAGING",
});
// Set up the error listener when the script loads
const cleanupErrorListener = bugReporter.setupErrorListener();
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
// Clean up the error listener when the component unmounts
if (cleanupErrorListener) {
window.addEventListener("beforeunload", cleanupErrorListener);
}
import BugReporter from "ui-bug-tracker";
// pass server endpoint where you need to store the bug report
const bugReporter = new BugReporter(
"https://your-api-endpoint.com/report",
ErrorUtils,
{
platform: "react-native",
env: "PRODUCTION/DEVELOPMENT/STAGING",
}
);
// Set up the error listener when the script loads
bugReporter.setupErrorListener();
AppRegistry.registerComponent(appName, () => App);