rxdb-utils
rxdb-utils copied to clipboard
React Native red screen error on replication.connect()
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:
- replace
console.error()
withconsole.log()
- even better: add another BehaviorSubject alongside with
alive$
(error$
e.g.) to observe errors optionally and not to clutter up the console.