> ## Documentation Index
> Fetch the complete documentation index at: https://docs.connect.fastenhealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Reference

> Configuration options, events, and styling guidance for the Stitch React Native SDK

<Note>
  This documentation is for [Stitch.js (v4) SDK](/stitch/v4/), which is now the recommended version for integrating Fasten Connect into your application.
  If you need access to the previous versions, please see [v1 documentation](/stitch/v1/) or [v3 documentation](/stitch/v3/).

  This version includes compatibility with additional runtime environments (Web, React Native, React etc), improved performance, and additional features.

  v4 is backwards compatible with v3 -- there are no breaking changes to the public API, but we have made significant improvements to the underlying codebase and architecture. If you are currently using v3, you can upgrade to v4 without making any changes to your code.

  The [v1 Web Component](/stitch/v1/) and [v3 Web Component](/stitch/v3) are in maintenance mode and will no longer receive updates (outside of security fixes).
  Please update your code to use the new version.
</Note>

```tsx theme={null}
import { FastenStitchElement } from 'fasten-connect-stitch-react-native';

const CUSTOMER_PUBLIC_ID = 'public_test_...';

export const ConnectScreen = () => (
  <FastenStitchElement
    publicId={CUSTOMER_PUBLIC_ID}
    email="patient@example.com"
    debugModeEnabled
    onEventBus={(event: StitchEvent) => {
      console.log('Fasten event', event);
    }}
  />
);
```

<ParamField path="publicId" type="string" required>
  This must be your API public ID. You can find it in your [Fasten Connect Portal](https://portal.connect.fastenhealth.com).
</ParamField>

<ParamField path="reconnectOrgConnectionId" type="string">
  (Optional) Useful when the patient connection credentials are invalid (due to expiration or revocation). Providing this `reconnectOrgConnectionId` allows Fasten to reauthenticate the Patient and store their new credentials.
  <Badge color="blue">Reconnect</Badge> When provided, the stitch component will skip the search step and go directly to the reauthentication step for the specified organization connection.
</ParamField>

<ParamField path="externalId" type="string">
  (Optional) An Opaque identifier, used to identify the patient in your system. This value will be returned in the response.
</ParamField>

<ParamField path="email" type="string">
  (Optional) The patient's email address. When provided, Fasten Connect prepopulates email fields in the TEFCA mode page, support request form, and health system request form. The patient can edit the prepopulated value before submitting a form.
</ParamField>

<ParamField path="searchOnly" type="boolean">
  (Optional) If set to `true`, the stitch component will only show the search box and will not prompt the patient to verify their email address.
</ParamField>

<ParamField path="searchQuery" type="string">
  (Optional) Prepopulate the search box with a query.
</ParamField>

<ParamField path="showSplash" type="boolean">
  (Optional) Show a splash page introduces Fasten Connect and displays your privacy policy & terms to the patient before they begin the connection process.

  <Expandable title="example">
    <Card img="https://mintcdn.com/fastenhealth/IYueoKtVsIn7sbVR/images/stitch-splash.png?fit=max&auto=format&n=IYueoKtVsIn7sbVR&q=85&s=6a1d04bc233829aad1058f70b5279392" width="958" height="1660" data-path="images/stitch-splash.png" />
  </Expandable>
</ParamField>

<ParamField path="eventTypes" type="string">
  (Optional) By default the following standard events are always emitted:

  * `patient.connection_pending`
  * `patient.connection_success`
  * `patient.connection_failed`
  * `widget.complete`.

  If you would like to receive the optional events listed below, you must set the `event-types` parameter to a comma-separated list of event types.

  * `search.query`: This event is emitted when the patient searches for a healthcare institution in the Fasten Connect catalog.
</ParamField>

<ParamField path="onEventBus" type="callback">
  (Optional/Recommended) This callback is called whenever the Stitch component emits an event. The callback receives a fully-parsed JSON object containing the event data.
</ParamField>

<ParamField path="tefcaMode" type="boolean">
  (Optional) If set to `true`, the stitch component will operate in TEFCA IAS mode, which is a streamlined experience designed to simplify medical record collection.
  In this mode, the patient will be able to verify their identity and pull medical records from healthcare institutions that participate in the TEFCA network, with minimal friction.
  See the [TEFCA IAS documentation](/guides/tefca-ias) for more information on this experience and its benefits.
</ParamField>

## Events

The Stitch React Native SDK emits client-side events that can be listened to in your React Native application.
The events are emitted on via the `onEventBus` callback you can pass to the `FastenStitchElement` component. The callback receives a fully-parsed JSON object containing the event data.

```ts theme={null}
onEventBus={(event: StitchEvent) => {
  console.log('Fasten event', event);
}}
```

See the [Events section of the documentation](/stitch/v4/client-events) for more information on the events emitted by the Stitch SDK and their payloads.
