Publish Expo React Native app with Python backend to the App Store - react-native

I’m building a trivia app in expo to deploy it to the App Store but my backend is in Python. Do I need to deploy the backend and frontend separately. If yes , what will be the best way? Or do you recommend to build everything in React Native.
In the backend I have a flask API applied to a Python script containing all the logic to retrieve, handle, and process the data(stored in a SQLlite DB) before it goes to the frontend.
I’m thinking about gunicorn and Heroku to deploy the API and request it from the front end

Related

React native project to use heroku express url

I have heroku backend express server project.I have react native project. I am trying to use heroku express url in my fetch in react native.. but I am getting network request failed.
I have two questions.
1.Why is that url not working in react native fetch, but opening in heroku.
Like react, can we put static files in build and try to serve that build in express app.use(express.static("client/build"));
Thanks a lot in advance.

Is it possible to use Prisma in a react native app?

In order to quickly prototype ideas for a personal project I'm interested in a solution where I use Prisma directly from a react native app. (I'm aware this is not something you'd do in production.) Data for the single user app would be stored in some free SQL cloud DB. I would store auth information locally in the client.
Is this possible just like it would be possible in a nodejs Cli or webapp?
Currently Prisma only works on servers so you would need to use it on Node. There's a request for react-native support so you can add upvote the request.

React Native & Cosmos DB - How to get them working together?

There seem to be no direct support for React Native through Cosmos DB SDK or npm packages. The JS package #azure/cosmos while works on React Native for the Web, but does not build for the native apps. It fails to build due to Cryto incompatibility.
While Resource Tokens can serve as a solution for authentication, but App still needs to interact with the DB resources using an API.
So, how to go around this? Is utilizing Azure Functions as a mid-tier the only workaround?
Thanks
If you need basic functionality like querying, creating new items etc, you can get the react-native-azure-cosmos package.
However the functionality is a very limited subset of the full JS SDK.
There is no official SDK for now to target react native applications.
You will need to use an API App or Function app to interact with CosmosDB and call the HTTP endpoints from your device.

Is it possible to use react-native-web to create PWA?

We are creating a web site which we want to use RN-web. (it's back port from RN app)
We'd like keep the possibility of converting to PWA later, wonder if it's possible to convert RN-web to PWA?
If you created your application with the expo-cli, now it's super easy to do it.
Expo web projects generate PWA assets and manifest by default, you only need to enable offline web support to get a full PWA.
You can follow the documentation https://docs.expo.io/guides/progressive-web-apps/
And enable service workers on your react native app https://github.com/expo/fyi/blob/master/enabling-web-service-workers.md

Migrating a native app to a RN/Expo app: keep user authenticated

I want to migrate an existing Android+iOS native app to a react-native Expo app.
In current native app, we store an auth token. I'd like this auth token to be available through ReactNative AsyncStorage api out of the box, without requiring RN native code (ie, ejecting Expo).
Is this possible, in current native app, to start writing to the same place as AsyncStorage will read after the migration?
We aim for the smoothest transition from native app to RN app, and user should stay authenticated after the upgrade.
Depends on what you're current app is using for storage. I recently used this library (https://github.com/kevinresol/react-native-default-preference) to get the data from user defaults then move it into async storage. I only migrate the refresh token and auth token.
If they are using core data, then you'll need to setup the same models etc - https://github.com/realm/realm-js/issues/584
The other storage mechanisms you can easily find a native package to get the data.
if the app is under same app name scheme you may be able to access after upgrade i guess.