Question React-Native

Asked

Viewed 195 times

-3

I wonder if an app that updates, for example, a small list of information automatically, when they undergo changes in the database (these changes not made in the app come elsewhere ) without pressing any button, is simple to do and if you have any performance problems or good practice.

  • As far as I know real-time updates depend on a "HOST TO BUILD REAL-TIME APPLICATIONS" that I believe is what you’re looking for, there’s a so-called "Pusher" there you can make an integration with your API and there have several languages probably have some way to integrate with the React-Native and make your list update in real time, without needing to click the button.

  • "is simple to make" That depends on your skill level ;)

  • In case I have fire base, I’m looking for some examples to use as a basis. Thank you for your attention.

1 answer

0

If you use the technology for showing off (Frontend), it is possible yes. Not that it is not possible to execute events, program data processing and etc. But by "Facility", it gives yes.

With React-Native you can create the interface, since, the technology Reactjs is a framework for UI, "...building user interfaces...".

This you can schedule an event or a function in the component lifecycle (React Key Concept) for whenever you open that "List", it make a request to a Web Server (Webservice) and display that list.

You wouldn’t need a Button. Just open the app and it would update the content every time you open that screen.

Making use of the function Fetch, together with the calls of Componentdidmount() you can achieve your goal without much difficulty.

The difficulty level varies according to your knowledge of Javascript and React technology.

Hope I helped, good development!

  • If you want to upgrade in real time, there are technologies that can do the automatic update. It’s not difficult, it’s complex. Different things. My suggestion is: Simple things, simple solutions. Since the server updates the data, delegate responsibility to query server changes to the device and not to the server. Let the device require a tag, version, number of records, last patch number, if you give Mismatch, pull the data again. Simple like this.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.