user11399165
user11399165

Reputation: 101

How to send data from web app/server to react native app?

I am new to React Native and to the whole mobile dev side, to be honest. I am getting involved in a project where we have a web app and we are now creating a react native app that needs to receive a notification if the user interacts with the web app.

Let's say there is a button on the Web App saying Get Data and if it's pressed, the React Native App needs to know that something has been requested by the Web App so it could respond with the correct course of action.

I am looking for possible solutions that I should look into. I have been looking into WebSocket and firebase notification services.

I would love to hear from you guys if you have been involved in a similar project or can suggest the best way to approach this.

Upvotes: 0

Views: 1635

Answers (3)

Rebai Ahmed
Rebai Ahmed

Reputation: 1600

You can use Expo as a beginner it helps you to get started https://expo.io/learn[Expo get started ][1]

[1]: https://expo.io/learn And it have its own tool https://docs.expo.io/versions/latest/guides/push-notifications/ it's easy for beginners with the mobile dev side

Upvotes: 1

Eduardo Schork
Eduardo Schork

Reputation: 175

You can send invisible push notifications from server side to mobile and in your app you read this invisible notification (some json), then you can identify the type of request, in your case Get Data, and from that you can fire a request or run some code.

Check out One signal, it's really useful

Upvotes: 2

HayTV
HayTV

Reputation: 573

You can use Firebase Realtime Database (it's free) to handle that such case. With this service, any client subscribe the node (path) will be notified when the node has any change (add, update, remove), so you do not need to care about server side and concentrate to implement client side. Hope this will help you!

Upvotes: 1

Related Questions