I started a project some days ago, I though I had to keep a local version of the data fetched as local state, but that brings a lot of complexity trying to keep things in sync with the db. I think I'll just refresh the page 🥴 thanks a lot!
Typically, you would run npx prisma migrate after making changes to your Prisma schema, and then run npx prisma db push to apply those changes to the database.
39:37 I am getting the error "Error: Loading initial props cancelled" on console, but it does create anew row in the db. I had to add an await to the fetch and just after the fetch the refreshData, as a temporary solution, how can i solve this?
Hi. I don't understand why you wrote a handleSubmit function to call another function which is create. Why don't you just call directly create() in the onSubmit form ?
So this is a full stack app that is much more simple and faster to make than something like a traditional React, Express, PostgreSQL app? I ask because I've only made full stack apps the long slow way that I mentioned above.
been having difficulty connecting to the postgres database.. did u use pgadmin 4 to connect? I get some password authentication error that prevents me from starting the server
Edit: I think my reply got deleted because I added a link to where it says in the docs. I know it's been two months but if anyone wants to know, replace: const Home: NextPage = ({notes}: Notes) => { with const Home: NextPage = ({notes}) => { That part in the docs isn't easy to find so if you copy and paste this at the end of the nextjs docs url to get to it: /api-reference/data-fetching/get-initial-props#typescript
If you want to install Next.js with typescript and tailwind css, this is the fastest way: npx create-next-app --example with-tailwindcss with-tailwindcss-app # or yarn create next-app --example with-tailwindcss with-tailwindcss-app
sometimes the universe delivers the exact video you need at the exact at the exact right time. thank u for this.
Literally, this was exactly what I needed
That was not the universe, was Darwin effort. But yes, sometimes happens and is great. Thanks!
I have been pulling my hair out to find a "simple" CRUD app I can play with in NextJS. Wish I had found yours days ago. Many thanks!
its the only tut around I've found so far of like 20, that actually includes a delete request. Many thanks for sharing!
Nice, clear and precise tutorial. Thx
what an amazing tutorial !!!
thanks. i'd enhoyed it and it was fun! you're fun!
Thanks. You seem fun too!
I started a project some days ago, I though I had to keep a local version of the data fetched as local state, but that brings a lot of complexity trying to keep things in sync with the db. I think I'll just refresh the page 🥴 thanks a lot!
Great tutorial. Thanks you!
Thanks for watching.
Typically, you would run npx prisma migrate after making changes to your Prisma schema, and then run npx prisma db push to apply those changes to the database.
thanks, I learn a lot. 👍
Hey Darwin, whats the font in vscode do you use ?
Dank mono
39:37 I am getting the error "Error: Loading initial props cancelled" on console, but it does create anew row in the db. I had to add an await to the fetch and just after the fetch the refreshData, as a temporary solution, how can i solve this?
the update part its like creating new data, not persist the same id of data. correct me if i'm wrong
LIT.
Appreciate it
Thank you for this wonderful video!
Do you know Remult (A CRUD framework for full stack TypeScript)?
Haven't heard of it but will check it out.
Hi. I don't understand why you wrote a handleSubmit function to call another function which is create. Why don't you just call directly create() in the onSubmit form ?
same thing, you can do either, it dosent matter
thanks this great, thank you a million!
Thanks a lot for watching!
THANK YOU SO MUCH
Thanks for watching!
is there a way to see created notes in pgadmin?
can you imagine?? just in time !! :)
Thanks!
Hey, what's the point in having a separate .env file?
You probably heard this a lot but... What is your vs code theme or visual settings? :) Thanks
Yeah get that quite a bit but the font is dank mono and night owl is the theme.
So this is a full stack app that is much more simple and faster to make than something like a traditional React, Express, PostgreSQL app? I ask because I've only made full stack apps the long slow way that I mentioned above.
Next js is a back end server sided framework that returns pre rendered react to the client.
Which extension gives an error?
Which vs code theme are you using ?
been having difficulty connecting to the postgres database.. did u use pgadmin 4 to connect? I get some password authentication error that prevents me from starting the server
hello, uses dbeaver
Nice, can u do with nexus and graphql (apollo) ?
It's a little old but I did do one with this stack a while back th-cam.com/video/MT5j7xroSu4/w-d-xo.html
Make video with jwt token and bcrypt authentication in next je and prisma Postgresql
bad idea to autoincrement ids, I'd suggest uuid and not Int as values can be predictable
What the heck is:
interface FormData {
title: string
content: string
id: string
}
Please explain. I'm getting an error saying:
Error:
x Unexpected token `interface`. Expected this, import, async, function, [ for array literal, { for object literal, @ for decorator, function, class, null, true, false, number, bigint, string,
| regexp, ` for template literal, (, or an identifier
,----
6 | interface FormData {
: ^^^^^^^^^
`----
Caused by:
0: failed to process input file
1: Syntax Error
Video was great, but record updating method is wrong
Hey, what happened at 34:30?
How did you get rid of the typing error?
Edit: I think my reply got deleted because I added a link to where it says in the docs.
I know it's been two months but if anyone wants to know, replace:
const Home: NextPage = ({notes}: Notes) => {
with
const Home: NextPage = ({notes}) => {
That part in the docs isn't easy to find so if you copy and paste this at the end of the nextjs docs url to get to it: /api-reference/data-fetching/get-initial-props#typescript
It's only missing trpc to make it the perfect stack
Just started looking at trpc recently.
I feel like Tailwind makes things more difficult than vanilla CSS. And it's ugly, at least in this display. But I love the app built here.
This is most certainly wrong lol.
@@Sammysapphira preference thing I guess.
If you want to install Next.js with typescript and tailwind css, this is the fastest way:
npx create-next-app --example with-tailwindcss with-tailwindcss-app
# or
yarn create next-app --example with-tailwindcss with-tailwindcss-app
use create t3 app
Why fetch with the server name and port ('localhost:3000/api/create') and not just fetch('/api/create')?