React Native with Couchbase via the REST API

I am starting a new React Native project and based on my previous experience with Couchbase I would like to use it as the persistence layer. Where can I get the docs to the REST API for Couchbase since as of today there is no official support for RN? Also when using RN and Couchbase, do I still have to use the sync gateway then the gateway connects to the actual server? Is there a well defined ‘preferred’ setup for this?

One thing to keep in mind is that Couchbase Lite cannot talk to Couchbase Server directly – it needs a Sync Gateway in the middle.

CBL <-> SG <-> CBS

You might want to check my fork of a more “native” React Native wrapper for Couchbase Lite: https://github.com/adamski/react-native-couchbase

I started off using the REST API via the react-native-couchbase-lite module, but a) I didn’t like when they changed the API, and b) I needed notifications for progress updates etc, so a wrapper around the actual CBL libraries was a better fit.

Be aware its for CBL version 1.4

And fyi - one more native plugin that was recently announced (disclaimer - I have not checked this out myself ) . Its only for 1.4 but author(@bjornd) indicates that they will be potentially looking into building one for 2.0 -

1 Like