@00:30 why not just use the params props that is available through the API routes for when you pass dynamic data to the backend instead of using split on URL. const {id} = params could have work
Thanks for the content man! One question: What if we want to map all blogs as soon as user adds new blog and without the need of refreshing the page manually? Any Suggestion would be appreciated!
2 common approaches, 1. Side effect using use effect, 2. another could be when user successfully added the blog, don’t refresh and don’t perform db operation, just append to that array in UI. Let me know if this works
When I try to build the app for a test deployment I get the error: Type error: Route "app/api/blog/route.ts" does not match the required types of a Next.js Route. "main" is not a valid Route export field. How can I fix this?
How to refresh the home page "/" automatically after navigating back from Create/Update blog pages, instead of waiting for 10 seconds and refreshing it manually. ?
how exactly? useRouter is used on blog/add/page and on blog/add/edit/[id] as router.push("/"), so it goes to "/" , but it still doesn´t refresh db unless you press F5.
@@andresdrimer yes you need to refresh after revalidate seconds to make this gets reflected. Check out my latest video of 8 mins where I have explained it in deep. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-T3dSQJnAJ9M.html
@@IndianCoders i saw that new tutorial and now it´s crystal clear!! thank you!! this is a trully valuable learning matherial. It would be great for the future if you could make something similar including Auth with roles and conecction between different tables on MongoDb. Amazing tutorial, awesome work!!
hello again! i´m having a lot of troubles deploying to Vercel, it throws a TypeError when generating static pages, i´ve tried a lot of different posibilities including //@ts-nocheck but it´s still stuck there. Maybe an update on deploy this would be really helpfull! :) (it also throwed another type error on /prisma/index , but it worked out with ts-nocheck).Thanks again for your great knowledge and inspiration.
Hello from Ukraine. Thank you very much for your video. It's a pity that you didn't add categories for the blog. Other than that, it turned out really great :)
@@brancode404 js is better for beginners like us, because learning nextjs and typescirpt and nextauth and tailwind and prisma all at once is overwhelming xD
Hellow, i am getting this error when i try to send POST request : - error TypeError: Cannot read properties of undefined (reading 'headers') at eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:265:61), so please help me find the solution
this is my error at least to try get if someone help me please ( TypeError: fetch failed at Object.fetch (node:internal/deps/undici/undici:11457:11) at async invokeRequest (C:\Users\54362\Desktop\full-stack ode_modules ext\dist\server\lib\server-ipc\invoke-request.js:17:12) at ) :(