> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/reusable-content/guide/guide-gs-reactnative-addapi1.md).

# guide/gs/reactNative/addAPI1

***

### Introduction

The React Native API for Apryse Mobile SDK includes all of the most used functions and methods for viewing, annotating and saving PDF documents. However, it is possible your app may need access to APIs that are available as part of the native API, but are not directly available to React Native.

This guide provides an example of how to add the following to the React Native interface:

* `pageChangeOnTap` prop that determines whether page will turn left or right when tapping corresponding edges.
* `getField` function which retrieves information about a field using its name.
* `onLayoutChanged` event listener that is raised when the layout of viewer has changed.

You can follow the same pattern to add new functions and props that your React Native app may need. The new additions could be simple ones, which expose one piece of functionality, or custom ones, that expose a series of native commands under the hood.

Prior to following this guide, we highly recommend you to go through the official guide here: [Native UI Components](https://reactnative.dev/docs/native-components-android/) to have a better understanding of the system.

#### 1. Fork and clone Apryse's React Native Repo

The source is hosted on GitHub here: [https://github.com/ApryseSDK/pdftron-react-native](https://github.com/ApryseSDK/pdftron-react-native/)

Fork the project and clone a copy of the repository to your disk.

### Adding the `pageChangeOnTap` prop

#### 2. Add prop to DocumentView\.tsx interface file

The `DocumentView.tsx` interface file lists all of the React Native props on the DocumentView component.

Add the prop declaration:

```js
static propTypes = {
  pageChangeOnTap: PropTypes.bool,
};
```

For props that accept `Config` constants or arrays of `Config` constants, use the `oneOf` and `arrayOf` helper methods. These helpers return flexible types that allow custom checks for TypeScript users, while maintaining standard run-time checks for all users.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/reusable-content/guide/guide-gs-reactnative-addapi1.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
