MiteSDK

Components Reference

All React Native components exported by the Mite SDK.

Every component must be rendered inside a MiteProvider. All of them ship with sensible default styling and need no configuration to work.

ComponentPurpose
MiteProviderProvide the Mite instance to the tree
ShakeToReportFull in-app bug reporting flow
ScreenshotAnnotatorDraw on and redact an image
WhatsNewRelease notes after an update
AnnouncementPopupShow-once announcement popup
FeatureRequestsSheetFeature request board
StoreReviewPromptReview deflection prompt

MiteProvider

Makes a Mite instance available to hooks and components.

<MiteProvider miteInstance={mite}>
  {/* Your app */}
</MiteProvider>
PropTypeDescription
miteInstanceMiteThe instance to provide. Required
childrenReact.ReactNodeYour app

ShakeToReport

In-app bug reporting: shake or tap to open, capture a screenshot, annotate, submit. Mount once. See In-App Bug Reporting.

<ShakeToReport showFloatingButton onSubmitted={r => console.log(r.id)} />
PropTypeDefaultDescription
shakeEnabledbooleantrueListen for shake gestures. Needs expo-sensors
showFloatingButtonbooleanfalseRender a floating bug button
screenshotEnabledbooleantrueCapture a screenshot. Needs react-native-view-shot
shakeOptionsShakeDetectorOptionsSensitivity and timing overrides
onSubmitted(response: SubmitBugReportResponse) => voidSuccessful submission
onError(error: Error) => voidSubmission failure
onQuotaExceeded(refusal: MiteQuotaRefusal) => voidAccount over a plan limit
quotaMessagestring'Reports are not being accepted right now. Please try again later.'Text shown to the user on a refusal

ScreenshotAnnotator

Full-screen image editor with a pen tool and a redaction rectangle tool.

<ScreenshotAnnotator
  imageUri={uri}
  onDone={annotatedUri => setAttachment(annotatedUri)}
  onCancel={() => setEditing(false)}
/>
PropTypeDescription
imageUristringImage to annotate. Required
onDone(annotatedUri: string) => voidCalled with the flattened result. Required
onCancel() => voidCalled when the user backs out. Required

WhatsNew

Shows release notes once per new app version. Mount once. See What's New.

<WhatsNew showOnFirstLaunch title="Latest updates" />

Accepts every useWhatsNew option plus:

PropTypeDefaultDescription
titlestring"What's New"Sheet heading
dismissLabelstring'Got it'Dismiss button label
onDismiss() => voidCalled after dismissal

Follows the system color scheme. Open it imperatively with showWhatsNew().

AnnouncementPopup

Shows the latest active announcement once per device. Mount once. See Announcements.

<AnnouncementPopup onCtaPress={url => track('announcement_cta', { url })} />

Accepts every useAnnouncementPopup option plus:

PropTypeDefaultDescription
dismissLabelstring'Got it'Dismiss button label
onDismiss() => voidCalled after dismissal
onCtaPress(url: string) => voidCalled before the action URL opens

Follows the system color scheme. Open it imperatively with showAnnouncement().

FeatureRequestsSheet

Wraps any element as a trigger that opens the feature request board. See Feature Requests.

<FeatureRequestsSheet>
  <Text>Request a feature</Text>
</FeatureRequestsSheet>
PropTypeDefaultDescription
childrenReactNodeTrigger element
titlestring'Feature requests'Sheet heading
accentColorstring#0a7ea4Vote and submit button color
onSubmitted(featureRequestId: string) => voidSuccessful submission

The board is fetched lazily when the sheet opens.

StoreReviewPrompt

Asks "Enjoying the app?" and routes the answer. See Store Review Prompt.

<StoreReviewPrompt visible={visible} onClose={() => setVisible(false)} />
PropTypeDefault
visibleboolean
onClose() => void
titlestring'Enjoying the app?'
messagestring'Your feedback helps us improve.'
positiveTextstring'Yes, I love it!'
negativeTextstring'Not really'
feedbackTitlestring'What could be better?'
feedbackPlaceholderstring'Tell us what went wrong...'
feedbackSubmitTextstring'Send feedback'
dismissTextstring'Not now'
feedbackReportTitlestring'In-app feedback'
onPositive(reviewRequested: boolean) => void
onNegative() => void
onFeedbackSubmitted(response: SubmitBugReportResponse) => void
onQuotaExceeded(refusal: MiteQuotaRefusal) => void
quotaMessagestring'Feedback is not being accepted right now. Please try again later.'

Providing onNegative skips the built-in feedback step.

On this page