How to add item to array in prisma database at frontend?
Hello, lets say I have user and this user have coins.
How can I then inside a React component add coins to this array?
And then displaying them on different page?
For example:
And then let's say in frontend I want a button that adds item to this Coin array.
2 Replies
you need a way to communicate from the react component with the api/database
be doing a api call (not secure for the most part)
or with something like trpc/graphql/etc
oh I see, since I'm already using trpc in my project I should dig into docs to see how it works with prisma