react-native-example
react-native-example copied to clipboard
Example project to demonstrate TypeORM with React Native.
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
- Follow the installation step for iOS and Android for the plugin
- Install TypeORM:
npm install typeorm --save
- Install Node.js types:
npm install @types/node --save-dev
- Add
skipLibCheck: true
to yourtsconfig.json
-file (Node.js and React Native definerequire
) - Use
react-native
astype
for your connection option (read more about connection options)