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

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.

Related

How to make ftp server in react native?

There are apps that creates ftp server in your local network so you can send documents and receive from it. I want to make a app like that. But every react native repo about this subject is really old. Is it possible to use Nodejs modules for this purpose? And what i should look for like static server or ftp server what should i search for?
I was thinking to use this https://www.npmjs.com/package/ftp but i don't know how to implement this module into react native. Is this the right module? Which module would be the best module for this app?

Where to store an Rest API

So I wrote an app in React Native. Now I have my Django Rest framework and a mysql database. I know: I should pay a hosting service to host my database and put the React Native code in the playstore. (This is meant symbolically) But Now I still have the Django Rest framework project - where should I store that? I may also have profile images in the app. Where should I store those? Sorry if the question seems a bit silly
You just need to get a webserver. For example Digital Ocean or Amazon Webservice, etc.. There you have to upload the project and you access the website over your own domain e.g.: www.yourproject.com
Now you can use your urls for example
www.yourproject.com/api/user
I hope I could help you

How to implement PayPal in Expo ReactNative app using Webview without Nodejs

I am developing an Ecpo ReactNative app and i looking to integrate PayPal to allow users to purchase some products using Webview, but I don't know how to do it. I came across this article: https://medium.com/#adityasingh_32512/integrating-paypal-in-your-react-native-app-4dcf89e11dd which explains how to do it but he uses a nodejs server and i won't necessarily implement a Nodejs server...
I also came across this article: How to integrate Paypal using React Native expo? where they offer other solutions, but which didn't satisfy me.
If you don't use a server integration (nodejs or otherwise), then obviously only client-side JS will be available. Here is a demo pattern of what you can do: https://developer.paypal.com/demo/checkout/#/pattern/client
There's nothing React-specific about it.

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.

React Native PayPal integration without server dependency?

I have tried with using Web view and having a Node server with paypal-rest-sdk as backend.
The flow seems to be a work around. Is there any way to directly integrate the Paypal with React Native code without any server calls or web views.
This isn't really a React question -- if no server is used, then you would be doing a client-only HTML/JS integration such as this one: https://developer.paypal.com/demo/checkout/#/pattern/client
That's possible to do. It would all be happening in a full mobile web experience, which then becomes the PayPal Checkout.
If your question was whether it's technically possible to do "server"-style REST API calls from a purely native React app, please put that thought out of your mind. Your 'secret' API key should never be in the possession of a client-side App.