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 !