Resgate in React.Native

Hi,
I’m just wondering how easy/difficult would it be to use Resgate in React.Native?
I understand Resgate client is for Reactjs.
Would I need to write my own client library from scratch? (how tricky would this be?) is there any existing client for react.native?
thanks!

Welcome to the forum! :partying_face:

Been away on eastern vacation, but now I am back to reply.

There is currently no client written specifically for React.Native; only for javascript.
Will it work with React.Native? I don’t see why it shouldn’t, but I know too little about React.Native to know for sure.

See: Using Libraries · React Native

ResClient does not access the DOM in any way, so that is a non-issue. It uses WebSockets however. React.Native supports WebSockets, but I don’t know if it implements the WebSockets API used by ResClient.

If not, you can still use ResClient and pass a websocket factory function to the ResClient constructor, which returns a wrapper that implements the needed WebSocket API. You have an example of that for node.js in this resolved GitHub issue: Support NodeJS · Issue #30 · resgateio/resclient · GitHub

Best regards,
Samuel