Available on the Corporate plan. This functionality is part of woku’s enterprise capabilities. Talk to our sales team.
@wokuapp/react-native SDK lets you capture feedback from your
mobile app: woku ratings (1 to 5) and NPS (0 to 10), with a text
or audio comment. It includes an offline buffer (captures are queued and
retried when there is a connection) and respects the company’s quarantine
rules.
Beyond native capture, the SDK also lets you share or embed
the woku web widget inside your app (for
example, in a WebView), reusing the same woku/NPS capture experience in
hybrid channels.
Installation
react and react-native are peer dependencies (already present in your app).
Initialization
Create aWokuSdk instance once and reuse it. Pass a storage
adapter so the offline queue persists across sessions (AsyncStorage or MMKV
work directly).
Capture a woku rating
Capture an NPS
Audio comment
Both captures accept an audio attachment instead of (or in addition to) text:Identify the respondent
Feedback is anonymous unless you send an identifier. Any of these fields is optional:Result of a capture
Each capture returns aSubmissionResult with its status:
Offline mode
Captures that cannot be sent are queued automatically and retried. You can force delivery and inspect the queue:flush() is when the app returns to the
foreground or when connectivity is restored.
Error handling
The SDK exposes typed error classes to distinguish the causes:WokuValidationError, invalid data (e.g.ratingoutside 1..5).WokuQuarantineError, the capture was blocked by quarantine.WokuNetworkError, network failure (the capture is usually queued).WokuConfigError, incomplete configuration at initialization.
Platforms
The
@wokuapp/react-native SDK integrates woku feedback into mobile apps
and works on both Android and iOS. React Native exposes a single API
in JavaScript/TypeScript and bridges to each platform’s native capabilities,
so the same code runs on both.
The SDK does not record audio: for voice comments it receives a file already
recorded by the app (its
uri and mimeType) and sends it as multipart. The
SDK’s API is identical on Android and iOS.
Versioning
The SDK follows semantic versioning (MAJOR.MINOR.PATCH):
- MAJOR, incompatible changes to the SDK’s public API.
- MINOR, new backward-compatible features.
- PATCH, backward-compatible bug fixes.
0.1.0. The versions and their notes
are available online on the
npm package and in the
GitHub releases. We
recommend pinning a compatible range (for example ^0.1.0) and reviewing the
changelog before moving up a MAJOR version.
Changelog
Most recent entries first. The published version covers Android and iOS equally.0.1.0
First published version of the SDK:- Capture of woku ratings (1 to 5) and NPS (0 to 10), with a text or audio comment.
- Persistent offline queue configurable via the
storageadapter, withflush(),pendingCount(),clearQueue()andmaxQueueAttempts. respondent.externalIdfield to correlate with your own systems.- Typed errors:
WokuConfigError,WokuValidationError,WokuQuarantineError,WokuNetworkError. - Delivery aware of the company’s quarantine rules
(
quarantinedstatus).
Resources
- npm package: @wokuapp/react-native
- Code and examples: github.com/wokuApp/sdks
- Releases and changelog: github.com/wokuApp/sdks/releases