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

# Polyfills

> [card] Recommended: JavaScript SDK for React Native
>
> While this SDK is still supported, we recommend using newer [JavaScript SDK](https://docs.dynamic.xyz/docs/javascript/reference/react-native-quickstart.md), which is optimized for React Native, but also comes with a host of other benefits.

Your React Native project might require polyfills for certain global objects. The requirements differ based on your Expo SDK version.

> [!NOTE]
>
> **Expo SDK 54 and above** have built-in support for most polyfills.
>
> **Expo SDK 53 and below** require additional polyfills as described in the sections below.

## For Expo SDK 54 and Above

**Installation**

```bash theme={"system"}
npm install @react-native-anywhere/polyfill-base64
```

Include the following code in your project's entry point:

```ts theme={"system"}
import '@react-native-anywhere/polyfill-base64';
```

## For Expo SDK 53 and Below

**Installation**

```bash theme={"system"}
npm install text-encoding react-native-get-random-values buffer @react-native-anywhere/polyfill-base64
```

Include the following code in your project's entry point to set up the polyfills:

```ts theme={"system"}
import 'react-native-get-random-values';
import '@react-native-anywhere/polyfill-base64';
import { Buffer } from 'buffer';

// Polyfill for @dynamic-labs/legacy-solana-extension
global.TextEncoder = require('text-encoding').TextEncoder;
global.Buffer = Buffer;
```

## Additional Requirements

If you're using ZeroDev, also please refer to the [ZeroDev polyfills](https://docs.dynamic.xyz/docs/react-native/reference/wallets/account-abstraction.md#events-polyfill) section.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.