The fastest way to get started is using the `amplify-app` npx script.

<iframe sandbox src="https://www.youtube-nocookie.com/embed/wH-UnQy1ltM" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<br/>

<BlockSwitcher>
<Block name="React Native">

Start with the [React Native CLI](https://reactnative.dev/docs/getting-started):

```bash
npx react-native@0.68.2 init AmplifyDataStoreRN --version 0.68.2
cd AmplifyDataStoreRN
npx amplify-app@latest
npm install aws-amplify amazon-cognito-identity-js @react-native-community/netinfo @react-native-async-storage/async-storage core-js
```

You will also need to install the pod dependencies for iOS:

```sh
npx pod-install
```

**Use SQLite for enhanced performance (optional)**

React Native CLI apps can now use SQLite with DataStore. SQLite offers considerable performance advantages over the default "AsyncStorage" database.

To enable SQLite with DataStore for enhanced local database performance, follow the steps below:

```sh
npx react-native@0.68.2 init AmplifyDataStoreRN --version 0.68.2
cd AmplifyDataStoreRN
npx amplify-app@latest
npm install aws-amplify amazon-cognito-identity-js @aws-amplify/datastore-storage-adapter react-native-sqlite-storage @react-native-community/netinfo @react-native-async-storage/async-storage core-js
npx pod-install
```

Then configure the SQLite storage adapter with DataStore in your app:

```js
import { DataStore } from 'aws-amplify';
import { SQLiteAdapter } from '@aws-amplify/datastore-storage-adapter/SQLiteAdapter';

DataStore.configure({
  storageAdapter: SQLiteAdapter
});
```

<Callout>

The SQLite storage adapter does not currently support custom primary keys.
Disable custom primary key in `amplify/cli.json` by setting `graphQLTransformer.respectPrimaryKeyAttributesOnConnectionField` to `false`.

</Callout>
</Block>
<Block name="Expo">

Start with the [Expo CLI](https://docs.expo.dev/):

```bash
npx create-expo-app AmplifyDataStoreExpo
cd AmplifyDataStoreExpo
npx amplify-app@latest
expo install aws-amplify amazon-cognito-identity-js @react-native-community/netinfo @react-native-async-storage/async-storage
```

**Use SQLite for enhanced performance (optional)**

Expo built apps can now use SQLite with DataStore. SQLite offers considerable performance advantages over the default "AsyncStorage" database.

To enable SQLite with DataStore for enhanced local database performance, follow the steps below:

```sh
npx create-expo-app AmplifyDataStoreExpo
cd AmplifyDataStoreExpo
npx amplify-app@latest
expo install aws-amplify amazon-cognito-identity-js @aws-amplify/datastore-storage-adapter expo-sqlite expo-file-system @react-native-community/netinfo @react-native-async-storage/async-storage core-js
```

Then configure the SQLite storage adapter with DataStore in your app:

```js
import { DataStore } from 'aws-amplify';
import { ExpoSQLiteAdapter } from '@aws-amplify/datastore-storage-adapter/ExpoSQLiteAdapter';

DataStore.configure({
  storageAdapter: ExpoSQLiteAdapter
});
```

<Callout>

The SQLite storage adapter does not currently support custom primary keys.
Disable custom primary key in `amplify/cli.json` by setting `graphQLTransformer.respectPrimaryKeyAttributesOnConnectionField` to `false`.

</Callout>
</Block>
</BlockSwitcher> 
