Pedro, I believe your case is a little lower. I don’t know what you want to develop, what kind of service you want, but the ideal would be to separate the layers yes, following this concept:
- React/Javascript to Front-end
- REST service to deliver data
- Do not embed data in App/Do not use local database
Local database is good only for quick query services, like, Book, where it has all the chapters written there.
The REST service I suggest, it doesn’t matter much what language you do, Java, PHP. NET, whatever, the important thing is that this layer converse with the Database, Mysql or Postgresql or whatever and deliver the data to your application, regardless of whether it is Android/iOS or even a website, because you serve all your applications independent of the platform.
A simple article to create an API: https://www.leaseweb.com/labs/2015/10/creating-a-simple-rest-api-in-php/
Example of Use:
- In React you create a registration form
- Send by AJAX to the URL http://rest.seusite.com/api/v1/users/add
- The service adds the registration and returns ok, or false, depends on..
- Your React application responds to successful registration and redirects to the user list screen
- in turn this user list screen requests another ajax for http://rest.seusite.com/api/v1/users/list
- Here returns a JSON with all registered users
- Your React application Lists users of your REST application
- And so it goes.....
I hope you understand the concept and understand that there is no solution to your case but several. Abs
You are developing an application that can exchange information with Mysql only for Registration confirmation!!
– Eugênio Preza