-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
- Provide a link to the affected event from your Sentry account
Package + Version
-
@sentry/browser -
@sentry/node -
raven-js -
raven-node(raven for node) - other:
Version:
"@sentry/react": "^6.1.0"
Description
https://codesandbox.io/s/sentry-show-dialog-user-d1lgw?file=/src/index.js
Whenever using the property showDialog on <Sentry.ErrorBoundary>, even though the user has been set previously, the dialog won't infer those settings and autofill the name and email fields on the widget form.
import React, { useEffect, useState } from "react";
import ReactDOM from "react-dom";
import * as Sentry from "@sentry/react";
Sentry.init({
dsn: process.env.SENTRY_DSN //ADD YOURS
});
function App() {
const [foo, setFoo] = useState("ahoy");
useEffect(() => {
Sentry.setUser({ email: "[email protected]", name: "Foobar" });
}, []);
return (
<Sentry.ErrorBoundary showDialog fallback={<h1>Error</h1>}>
<h1>Hello {foo}</h1>
<button onClick={() => setFoo({ foo: true })}>Break the world</button>
</Sentry.ErrorBoundary>
);
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);Metadata
Metadata
Assignees
Labels
No labels