React component
We have an npm package that exposes our feedback form as a React component. To use it, first install the package:
npm install @feedback-fish/react
Then import the component in your React app and wrap whatever button you want to trigger the widget with it:
import { FeedbackFish } from '@feedback-fish/react'
const App = () => {
// Get your projectId from your dashboard at feedback.fish/app
return (
<FeedbackFish projectId="...">
<NavButton>Send feedback</NavButton>
</FeedbackFish>
)
}
To identify the submitting user, pass the email of the currently authenticated user to the userId
prop:
<FeedbackFish projectId="..." userId={currentUser.email}>
<NavButton>Send feedback</NavButton>
</FeedbackFish>