Skip to content

Expo

bash npm install hakka-react-native

Then install the recommended Expo peers:

Terminal
npx expo install @react-native-clipboard/clipboard expo-dev-client

Clipboard is optional — if your app already uses expo-clipboard, Hakka’s copy actions use it automatically and you can skip the community package.

  1. Add the plugin to app.json

    app.json
    {
    "expo": {
    "plugins": [["hakka-react-native", {}]]
    }
    }

    The plugin adds Android debug/release Hakka network artifacts during prebuild. iOS dependencies are handled by React Native autolinking and CocoaPods.

  2. Opt in to Android performance collectors (optional)

    app.json
    {
    "expo": {
    "plugins": [["hakka-react-native", { "androidPerformance": true }]]
    }
    }

    Performance collectors stay opt-in so the base native capture setup stays small.

  3. Rebuild native projects

    Terminal
    npx expo prebuild --clean
    npx expo run:ios
    npx expo run:android
  4. Verify it works

    Shake the device or press m in the Expo CLI to open the dev menu, then open the Hakka overlay. Make any network request in your app — you should see it appear in the inspector with method, status, and timing.

    The Hakka inspector on iOS showing a captured request: GET https://httpbin.org/get, status 200, 840ms, with Mock this / Export / Replay actions and Overview / Request / Response / Timing tabs. The floating bubble above shows live request, error, UI-FPS and JS-FPS counters.

After your development build is installed, JS-only changes do not require a rebuild:

Terminal
npx expo start

You only need to rebuild (npx expo run:ios / npx expo run:android) when you change native dependencies or plugin configuration.

If you import hakka-react-native/ui, install the UI peers:

Terminal
npx expo install react-native-gesture-handler react-native-reanimated react-native-safe-area-context react-native-svg react-native-worklets

Then add the Worklets Babel plugin last in babel.config.js:

babel.config.js
module.exports = function (api) {
api.cache(true)
return {
presets: ['babel-preset-expo'],
plugins: ['react-native-worklets/plugin'],
}
}

Expo SDK 56’s Apple native-module improvements do not change Hakka’s current integration path. Hakka remains a standalone React Native package with a TurboModule/codegen bridge over native Android and Swift SDKs.