typeorm / react-native-example

Example project to demonstrate TypeORM with React Native.
68 stars 29 forks source link
orm react react-native typeorm

Using TypeORM with React Native

Starting with 0.2.0-alpha.44 TypeORM supports React Native with the react-native-sqlite-storage plugin. This example shows how you can use TypeORM in your app. Use react-native run-android to run this example on your device.

Add TypeORM to your app

  1. Follow the installation step for iOS and Android for the plugin
  2. Install TypeORM: npm install typeorm --save
  3. Install Node.js types: npm install @types/node --save-dev
  4. Add skipLibCheck: true to your tsconfig.json-file (Node.js and React Native define require)
  5. Use react-native as type for your connection option (read more about connection options)

Screenshot