2
votes

Is it possible to integrate React-Native with Webhooks?

Currently, I have a chatbot using React, Dialogflow and webhooks. I am intending to port over to React-Native. Hence, I like to find out if possible to use webhooks to integrate React-Native with Dialogflow?

When I google, I find tons of materials regarding React with Webhooks but none concerning React-Native with Webhooks.

In case not possible to integrate React-Native with Webhooks, how does one work around it then?

Thanks :)

1
You may find this useful - react-native-dialogflowJoseph D.

1 Answers

1
votes

Webhooks usually mean that a URL is called which triggers some kind of action on your server. In the client world you would use sockets.

So if you wish to communicate from server to client instead of vice versa you should either use sockets or native notifications, at least for iOS.

The app is only alive for a certain amount of time when not being used and then its terminated by OS on Apple products. Your socket will thus be shut down. Apple recommends to use native notifications to wake you app up in such cases.

This works espacially well for chat or voip apps.

There are a bunch of frameworks for handling push notifs here is a good tutorial: https://medium.com/ios-expert-series-or-interview-series/voip-push-notifications-using-ios-pushkit-5bc4a8f4d587