Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt

Use this file to discover all available pages before exploring further.

React Native project requirements

The library requires React Native 0.85.3+ with a react version that satisfies React Native’s declared peer dependency (^19.2.3 for react-native@0.85.3). Also requires Node ≥ 24.0.0 and npm ≥ 11.0.0.
PlatformMinimumNotes
iOS deployment target16.4Required by Expo SDK 56 (raised from 15.1 in 55). Set in ios/Podfile (platform :ios, '16.4').
Android minSdkVersion24 (Android 7.0)Set in android/build.gradle. Required by RN 0.85.
Android compileSdkVersion / targetSdkVersionRN 0.85 + Expo SDK 56 defaultsDon’t override unless required. Set by react-native-gradle-plugin / expo-root-project after expo prebuild.
To install the npm libraries provided by FlowX.AI you will need access to the private FlowX.AI Nexus registry. Consult your project DevOps.
react must satisfy React Native’s published peer dependency. For react-native@0.85.3 this is ^19.2.3; newer RN 0.85.x patches may shift it — check with npm view react-native@<your-version> peerDependencies. Installing React Native via the official template (Bare CLI) or Expo SDK 56 picks a compatible react automatically — don’t override it with a manual pin unless you have a reason.

Installation

For new projects, bootstrap with the official React Native template so react and react-native ship as a matched pair that satisfies the peer dependency in the Warning above:
npx @react-native-community/cli@latest init MyApp
cd MyApp
For existing projects, ensure react already satisfies your installed react-native’s declared peer (npm view react-native@<your-version> peerDependencies) before installing the FlowX SDK.Then install the FlowX SDK and peers:
npm install \
  @flowx/react-native-sdk@<version> \
  @flowx/react-native-ui-toolkit@<version> \
  @flowx/react-native-theme@<version> \
  @flowx/core-sdk@<version> \
  @flowx/core-theme@<version> \
  @react-navigation/native \
  @react-navigation/native-stack \
  @react-navigation/elements \
  react-native-screens \
  react-native-safe-area-context \
  react-native-svg \
  react-native-enriched-markdown \
  react-native-keyboard-controller \
  react-native-reanimated \
  react-native-worklets \
  @react-native-community/datetimepicker \
  @react-native-community/slider \
  @react-native-segmented-control/segmented-control
Replace <version> with the correct version corresponding to your platform version.To find the right version, navigate to: Release Notes → Choose your platform version → Deployment guidelines → Component versions.
Then install iOS pods:
cd ios && pod install && cd ..
Some peer dependencies require additional setup beyond npm install: Babel plugins, Expo config plugins, native project edits (Podfile, styles.xml, AndroidManifest.xml), or app-root providers. Check each library’s install guide and apply its setup steps. Examples: react-native-worklets needs a Babel plugin (see below), react-native-keyboard-controller needs an Expo config plugin in managed projects, and react-native-screens / react-native-safe-area-context rely on autolinking plus the providers shown later in this page.

Babel plugin

react-native-worklets/plugin must be the last plugin in your Babel config.
No manual config needed. babel-preset-expo (SDK 54+) auto-adds the worklets plugin when react-native-worklets is in node_modules.
// babel.config.js
module.exports = function (api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
  };
};

Android Material 3 date picker (opt-in)

FlxDatePicker on Android renders the legacy AppCompat calendar by default. To use the Material 3 picker, the host app’s AppTheme must inherit from a Material 3 parent and the toolkit runtime flag material3 must be true. With the flag off, the legacy calendar renders and the theme change is irrelevant.
Register the @flowx/react-native-ui-toolkit config plugin. It rewrites AppTheme to a Material 3 parent and injects extra.flxUiToolkit.material3 = true into the app config, so no JS opt-in is needed:
{
  "expo": {
    "plugins": [
      "@flowx/react-native-ui-toolkit"
    ]
  }
}
Then run npx expo prebuild --clean --platform android.
No Gradle changes required. com.google.android.material:material is already on the classpath via androidx.appcompat. Skip both steps and FlxDatePicker keeps rendering the legacy calendar with no crash.

App-root providers

The renderer expects safe-area and keyboard providers above it in the tree:
import { SafeAreaProvider } from 'react-native-safe-area-context'
import { KeyboardProvider } from 'react-native-keyboard-controller'

export default function App() {
  return (
    <SafeAreaProvider>
      <KeyboardProvider>
        {/* FlowX process view goes here */}
      </KeyboardProvider>
    </SafeAreaProvider>
  )
}
The SDK mounts its own NavigationContainer internally, wrapped in NavigationIndependentTree. A host NavigationContainer is not required. If your app already uses @react-navigation/native, keep its NavigationContainer at the root. The SDK’s internal navigator stays isolated from it.

Authorization

The client app implements the authorization flow (using the OpenID Connect standard). The SDK expects a bearer token to be set via FlowX.setAccessToken(token) before starting a process.
import { FlowX } from '@flowx/react-native-sdk'

FlowX.setAccessToken(accessToken)
Call setAccessToken again whenever the token is refreshed.

Configuring the SDK

FlowX.configure(cfg) sets global SDK config. Call it once at app bootstrap, before starting any process.
import { FlowX } from '@flowx/react-native-sdk'

FlowX.configure({
  baseURL: 'https://yourDomain.dev',
  processApiPath: 'onboarding',
  organizationId: '10000001-0001-0001-8001-100000000001',
  language: 'en',
  locale: 'en-US',
  staticAssetsPath: 'https://yourDomain.dev/static',
  isDraft: false,
})

FlxConfig parameters

NameDescriptionTypeMandatoryDefault
baseURLBase API URLstringtrue-
processApiPathProcess subpathstringtrue-
organizationIdFlowX-issued organization UUID. On self-hosted deployments it matches the ORGANIZATION_ID configured during the backend upgrade — see License and organization configuration.stringtrue-
languageLanguage used to localize enumerationsstringfalse-
localeLocale used to format dates, currency, numbersstringfalse-
staticAssetsPathBase path for static resources (icons, media). The SDK logs a warning if not set.stringfalse-
themeIdTheme identifier (reserved, not consumed by the RN renderer yet)stringfalse-
isDraftStart the process in draft statebooleanfalsefalse

Starting a process

FlowX.startProcess(opts) starts a new process instance and returns a FlxProcessHandle. The handle exposes a ProcessView component that you mount inside a screen.
import { FlowX, type FlxProcessHandle } from '@flowx/react-native-sdk'
import { useEffect, useState } from 'react'

export function OnboardingScreen() {
  const [handle, setHandle] = useState<FlxProcessHandle | null>(null)

  useEffect(() => {
    let active = true
    let pending: FlxProcessHandle | null = null

    FlowX.startProcess({
      workspaceId: '8f52744-8403-4e8d-...',
      projectId: '111111-222222-333333-44444',
      processName: 'client_identification',
      params: { firstName: 'John', lastName: 'Smith' },
    }).then((h) => {
      if (!active) {
        h.dispose()
        return
      }
      pending = h
      setHandle(h)
    })

    return () => {
      active = false
      pending?.dispose()
    }
  }, [])

  if (!handle) return null
  const { ProcessView } = handle
  return <ProcessView />
}

StartProcessOptions

NameDescriptionTypeMandatoryExample
workspaceIdWorkspace identifierstringtrue'8f52744-8403-4e8d-...'
projectIdFlowX Project UUID. Get it from FlowX Dashboard → Projects → copy UUID from the project actions popover.stringtrue'111111-222222-...'
appVersionIdPin to a specific app versionstringfalse-
processNameIdentifies the process to startstringtrue'client_identification'
paramsData passed when starting the processRecord<string, unknown>false{ firstName: 'John' }
resourceIdResource identifierstringfalse-
buildIdPinned build identifierstringfalse-
isModalRender the process as a modal screenbooleanfalsefalse
onCloseCalled when the process view is closed() => voidfalse-
onProcessStartedCalled when the main process instance is started. Receives the new processInstanceUuid.(processInstanceUuid: string) => voidfalse-

Getting the process identifier

Open the FlowX Designer, navigate to the process, and copy the process name from the breadcrumbs. Use this value as processName.

Continuing a process

FlowX.continueProcess(opts) resumes an existing process instance by its UUID.
import { FlowX } from '@flowx/react-native-sdk'

const handle = await FlowX.continueProcess({
  processInstanceUuid: 'a3f1c2d4-...',
})

ContinueProcessOptions

NameDescriptionTypeMandatory
processInstanceUuidUUID of the process instance to resumestringtrue
isModalRender the process as a modal screenbooleanfalse
onCloseCalled when the process view is closed() => voidfalse

The process handle

Both startProcess and continueProcess resolve to a FlxProcessHandle:
interface FlxProcessHandle {
  processInstanceUuid: string
  ProcessView: ComponentType
  dispose(): void
}
MemberDescription
processInstanceUuidUUID of the running process instance
ProcessViewReact component that renders the process screens. Mount it inside a screen in your navigation tree.
dispose()Tears down the running process and resets SDK stores. Call when the screen unmounts.
Always call handle.dispose() when the host screen unmounts. Skipping it leaks SDK store state into the next process.

Full example

import { useEffect, useState } from 'react'
import { SafeAreaProvider } from 'react-native-safe-area-context'
import { KeyboardProvider } from 'react-native-keyboard-controller'
import { FlowX, type FlxProcessHandle } from '@flowx/react-native-sdk'

FlowX.configure({
  baseURL: 'https://yourDomain.dev',
  processApiPath: 'onboarding',
  organizationId: '10000001-0001-0001-8001-100000000001',
  language: 'en',
  locale: 'en-US',
  staticAssetsPath: 'https://yourDomain.dev/static',
})

function OnboardingScreen({ authToken }: { authToken: string }) {
  const [handle, setHandle] = useState<FlxProcessHandle | null>(null)

  useEffect(() => {
    FlowX.setAccessToken(authToken)

    let active = true
    let pending: FlxProcessHandle | null = null

    FlowX.startProcess({
      workspaceId: '8f52744-8403-4e8d-...',
      projectId: '111111-222222-333333-44444',
      processName: 'client_identification',
      params: { firstName: 'John' },
    }).then((h) => {
      if (!active) {
        h.dispose()
        return
      }
      pending = h
      setHandle(h)
    })

    return () => {
      active = false
      pending?.dispose()
    }
  }, [authToken])

  if (!handle) return null
  const { ProcessView } = handle
  return <ProcessView />
}

export default function App({ authToken }: { authToken: string }) {
  return (
    <SafeAreaProvider>
      <KeyboardProvider>
        <OnboardingScreen authToken={authToken} />
      </KeyboardProvider>
    </SafeAreaProvider>
  )
}
Last modified on June 2, 2026