We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Platform/SDK
React User Feedback Configuration
In this code example, @sentry/react doesn't export Feedback in the latest SDK.
@sentry/react
Feedback
import { BrowserClient, Feedback, getClient } from "@sentry/react"; function MyFeedbackButton() { const client = getClient<BrowserClient>(); const feedback = client?.getIntegration(Feedback); // Don't render custom feedback button if Feedback integration isn't installed if (!feedback) { return null; } return ( <button type="button" onClick={async () => { const form = await feedback.createForm(); form.appendToDom(); form.open(); }} > Give me feedback </button> ); }
import { BrowserClient, feedbackIntegration, getClient } from "@sentry/react"; type FeedbackIntegration = ReturnType<typeof feedbackIntegration> function MyFeedbackButton() { const client = getClient<BrowserClient>(); const feedback = client?.getIntegrationByName<FeedbackIntegration>('Feedback'); // Don't render custom feedback button if Feedback integration isn't installed if (!feedback) { return null; } return ( <button type="button" onClick={async () => { const form = await feedback.createForm(); form.appendToDom(); form.open(); }} > Give me feedback </button> ); }
The text was updated successfully, but these errors were encountered:
Assigning to @getsentry/support for routing ⏲️
Sorry, something went wrong.
That results in this, which seems a bit wrong? But yes the current example just doesn't work.
Is there an update on this issue? I have had to use the workaround for custom UI as well.
No branches or pull requests
Core or SDK?
Platform/SDK
Which part? Which one?
React User Feedback Configuration
Description
In this code example,
@sentry/react
doesn't exportFeedback
in the latest SDK.Suggested Solution
The text was updated successfully, but these errors were encountered: