-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Native support #5011
Comments
Can you please elaborate a bit @CanRau? Do you mean using Prisma on an iOS/Android device using SQLite as a database? |
Exactly 😀👍 especially photon I guess
|
Any update on this? I would love it. |
These look related to this issue I'm planning to use prisma client in react native application if it's possible :) Prisma + React SQLite will extremely help us a lot to build applications that need some secure local environments. Something like end-to-end encrypted messengers or blockchain light nodes on mobile. |
Prisma 1 PRs and issues are totally unrelated to this repository, as Prisma 2 shares very little with Prisma 1 - sorry. |
Gocha, thanks! But I think the voice of the community may not be unrelated :) |
Any updates ? |
Prisma's support for SQLite is perfect and would be the first choice for developers if it could support mobile. Not sure if there is a very large migration cost to add client-side support, any contributors willing to talk about that? |
😲 This is awesome!! If you provide prisms for react-native!!!! |
any update on this? |
I'm looking forward to this update as well. |
I'm looking forward to this update as well |
It would be amazing if we could share and use the data model both on the server and the client, it would be a killer feature for Prisma! |
prisma is one of the best choice for react/nextjs. it will be great if will be supported react-native/expo as well <3 |
would love the functionality. it would make things easier |
Are there any updates yet? Would love to use prisma with rn... |
i nees prisma for react native :/ |
This would be huge. What’s preventing this from working right now. What node-specific packages is Prisma using?
…On Sat, Jul 2 2022 at 15:17, WilliamPeralta < ***@***.*** > wrote:
i nees prisma for react native :/
—
Reply to this email directly, view it on GitHub (
#5011 (comment) ) , or
unsubscribe (
https://github.com/notifications/unsubscribe-auth/AB6T25PXUZV4LOIWOSAEHIDVSC5XLANCNFSM4WBCXIZQ
).
You are receiving this because you commented. Message ID: <prisma/prisma/issues/5011/1172971413
@ github. com>
|
Bump. Any updates re this? There's still a huge want for this! |
This comment was marked as spam.
This comment was marked as spam.
Hey guys , I had a web application which uses prisma , planetscale(SQL DB) in next js . I am thinking to make an application for andriod/IOS for the same userbase . Does it possible to do that ? Like can we use planetscale in react native environment ? also prisma |
@AdityaPainuli The mobile application would need to talk to an API on your server that uses Prisma for now. |
What would you recommend for type safety in that case? |
No recommendation, whatever works with your mobile framework. If it benefits from know about the models in your database, you can create a Prisma generator that outputs some files you can use. But usually the mobile app would be coupled closer to your API, so e.g. the types from the GraphQL API or REST API. |
Any updates? |
Sometimes I wonder what I would need to do and what knowledge I would need to be able to contribute with a feature like that. |
A simple start to help could be a React native application that uses some other Node based ORM or query builder to talk to a database. That could then help us understand how this actually works, and then see if Prisma can achieve the same - or not. |
@janpio example project I think this example is with an older version of typeorm, if you need I can create an example with newer version but basically they adapted a package run in the browser outside the node environment https://docs.expo.dev/versions/latest/sdk/sqlite/ import { DataSource } from 'typeorm/browser';
import * as SQLite from 'expo-sqlite'; |
++1 for this |
I believe it is possible to implement this feature for prisma, well now I know what to work on in my spare time hee hee |
How can this be done? Let me join? @gabrielrfmendes |
This is not trivial since Prisma’s core is written in Rust or Go or something. It’s not in JS or C so it’s hard to use on a mobile device without shipping a large binary. Check out https://github.com/drizzle-team/drizzle-orm which is just TypeScript. I haven’t tested it out with React Native but it’s probably a lot easier to get it to work. |
Prisma syntaxe is a lot better. |
Currently prisma has no way of running on Android OS. As useful as client side ORM's are and despite "Client" in "Prisma Client", Prisma CRUD operations should be ran on a server instead of on client for many reasons, mainly security, this does not exclude React Native. Ship your backend code and Prisma Client ORM with any deployed Node.js server and run front end React Native requests to your API. Until a full fledged framework is built over React Native, this is how it should be done. At the end of the day, even a full fledged framework such as Next.js will deploy your Prisma project in this way. No need, and not safe to run Prisma Client ORM on the actual client, respectively. |
Some apps dont need that level of security or a dedicated backend, its just for local database operations using sqlite for example, It already works with others ORMs but prisma is much easier to use compared to others |
Any update on this? |
would like to use prisma with react native as well |
This also doesn't consider usecases such as building React Native Windows applications, where you might not be needing a server application whatsoever |
yall can go for the create-t3-app turbo stack. |
React Native client is not the same as a web app client run in the browser. React Native is more like a desktop app. If the app is offline only you should be able to use the Database stored on the device (and being able to Prisma would be great). This is not the same as having SQLite (or IndexeDB) run in the browser tab and having Prisma use that. React Native is more like Electron if you would like to compare it. I would love to have Prisma run with SQLite on Android via React Native. |
I am writing an mobile app and initially I went with the prisma for DB. I liked prisma a lot, but then I needed to make my app to work offline in offline-first manner. I wanted a find a way how I can have the same schema for client and backend, so for this purpose it was necessary to migrate from Prisma to TypeOrm. Didn't liked it much, it felt like downgrade comparing to prisma. I would love to migrate back to prisma if there will be any way to run it on client for offline-first applications. |
Any recent update on the topic from Prisma contributors? I would be very grateful to have such an easy way to communicate with my SQLite database through my React Native app. |
I'm not sure if I would be able to do this, but maybe someone can create a PoC of Prisma on React Native. You only need to give the green light that this is something you want to have in the project. Any feedback would be great. Just say:
If you decide, maybe someone will be able to make it work. But saying "yes", someone that would like to try to play with it, will not waste time. |
It's already happening |
It's great news. |
To learn more about Prisma for Expo and React Native, join us at App.js in Krakow, or keep an eye on the Prisma Blog end of May. |
Is the Prisma direction heading towards realtime sync as well ? Something to do with Pulse ? |
If Prisma will integrate in react native apps with a reasonable price, it will be a huge player in the market, maybe the biggest competitor of mongodb with its "recently" acquired Realm |
Is or will React Native be supported?
The text was updated successfully, but these errors were encountered: