PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, May 19, 2022

[FIXED] How can I make a React native app offline?

 May 19, 2022     api, offlineapps, react-native, web-services     No comments   

Issue

I have a react native application to answer evaluations with different fields and load images. I need to make than the user can login and answer the evaluations offline and when the device its online, use the Web Services to load the answers automatically.

I am using React Native with Expo and Web Services to get data of forms.

Any idea where to start or how can i do it?


Solution

First, you need to check to internet connection, to make sure the device is online or offline. For this, you can use this library @react-native-community/netinfo.

Second, you need to store the question and answer on redux, so when the device is offline, you can load the question from redux. When the device is online, you can load the question from api.

Hope this works for you.



Answered By - Ganda Rain Panjaitan
Answer Checked By - David Marino (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing