rxdb-utils icon indicating copy to clipboard operation
rxdb-utils copied to clipboard

React Native red screen error on replication.connect()

Open psolom opened this issue 5 years ago • 2 comments

I tried to use replication plugin, but it fails with React Native when the remote DB is down.

The reason is when React Native app in the development mode it stops with a red error screen when faced at console.error(). It's caused by lines:

https://github.com/rafamel/rxdb-utils/blob/master/src/replication.js#L94 https://github.com/rafamel/rxdb-utils/blob/master/src/replication.js#L102

I would suggest the follow options:

  1. replace console.error() with console.log()
  2. even better: add another BehaviorSubject alongside with alive$ (error$ e.g.) to observe errors optionally and not to clutter up the console.

psolom avatar Oct 28 '18 20:10 psolom