Mite SDK

Hooks Reference

Complete reference for all React hooks provided by the Mite SDK.

useMite

Access the Mite instance from any component within MiteProvider:

import { useMite } from '@usemite/mite-sdk'

const mite = useMite()

useReleases

Fetch app releases with loading state management.

import { useReleases } from '@usemite/mite-sdk'

const { releases, loading, error, refetch } = useReleases(options?)

Options

OptionTypeDefaultDescription
platform'ios' | 'android' | 'all''all'Filter by platform
limitnumberMax number of releases
enabledbooleantrueEnable/disable fetching

Return Value

FieldTypeDescription
releasesRelease[]Array of releases
loadingbooleanWhether data is being fetched
errorError | nullError if fetch failed
refetch() => voidManually trigger a refetch

useFeatureRequests

Fetch the feature request board with vote state.

import { useFeatureRequests } from '@usemite/mite-sdk'

const { featureRequests, votedFeatureRequestIds, loading, refetch } =
  useFeatureRequests(options?)

Options

OptionTypeDefaultDescription
enabledbooleantrueEnable/disable fetching
voterEmailstringEmail to check votes for

Return Value

FieldTypeDescription
featureRequestsFeatureRequest[]Array of feature requests
votedFeatureRequestIdsstring[]IDs the voter has voted for
loadingbooleanWhether data is being fetched
refetch() => voidManually trigger a refetch

useBugReport

Submit bug reports.

import { useBugReport } from '@usemite/mite-sdk'

const { submitBugReport, loading, error } = useBugReport()

Return Value

FieldTypeDescription
submitBugReport(payload: BugReportPayload) => Promise<void>Submit a bug report
loadingbooleanWhether submission is in progress
errorError | nullError if submission failed

On this page