Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Couchbase lite react native tracking network and replication

$
0
0

I'm a newbie in both react native and couchbase lite, and I try this sample application https://github.com/jmn8718/RNCouchbaseExample.git .

This sample, connect mobile couchbase lite db to a remote sync gateway.

But when mobile go offline, and then go online, replication not reboot or don't detect connection lost. Do you have some idea on how to fix it ? Do I need to track network status myself in mobile app, or use replication with a timer ?

My actual replication code :

function repl() {
     database.replicate(`http://${SG_URL}/${DB_NAME}`, DB_NAME, REPLICATION_OPTIONS)
     .then(res => {
       console.log('replicate:' + util.inspect(res, {showHidden: false, depth: null}) )

       })
}
repl()

Thank you !


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>