0.3.0 • Published 1 year ago
@feedback-otter/react v0.3.0
Feedback Otter React
"You Otter be collecting feedback"
THIS PACKAGE IS NOT READY FOR USE YET
I'll be using the README to do document driven development through this project.
The open source feedback collecting toolchain for React
Getting Started
- Import the client
import { FeedbackClient } from '@feedback-otter/client'
- initialize with your backend communication
- REST - POST request (PUT is also available with field
restRequest:"PUT"
) - GraphQL - Mutation with the following schema
message: String, location: String, context: JSON
- tRPC -
- Raw WebSocket
- Socket.io
const client = new FeedbackClient({
requestType: 'REST',
url: 'https://example.com/feedback',
})
- Use the provider
<FeedbackProvider client={feedbackClient}>{children}</FeedbackProvider>
- Optional - Cloudflare Turnstile or Google Recaptcha
Examples
See the examples folder for how to use the React components
- Next.js REST example
- Redwood.js GQL example
- SPA & separate backend example