Open Billydubb opened 7 years ago
For anyone who might be interested in using camo with react-native, here's what worked for me:
install Buffer
Add Buffer to global namespace in index.js (Buffer is used in validate.js)
Install path
Uncomment or remove require(‘fs) in nedbclient.js
Replace const Datastore = require(‘nedb’) with const Datastore = require(‘react-native-local-mongodb) in nedbclient.js
If you want to make this a standalone lib, then you should add the following dependencies to package.json
Optionally in db.js remove all the mongodb stuff
Optionally, remove the mongoclient.js file
Hey, I am using react-native-local-mongodb, which is basically a fork of nedb adapted for react-native. To use camo with React Native you have to change and add a few things. Would you be interested in a PR with the changes I've made for react native or do you think I should put that in a separate repo?