Welcome to Max Programming! This channel is focused on providing tutorials, tips, and tricks on web development, JavaScript, Node.js, React.js, Next.js, and TypeScript. I strive to provide useful content that can help you get the most out of these technologies and create the best possible web development projects. Subscribe to the channel to stay up to date on the latest web development trends and techniques!
I don't think they necessarilty block the main thread but they're the first priority. And this script we're adding should load before the page hence we added the `beforeInteractive` strategy nextjs.org/docs/app/api-reference/components/script#beforeinteractive
Nicely done and well explained brother I've built it in my app! I would love to see prisma & providers & credentials with Next-Auth. Here's a challenge for you 🤝🤝
@@mickeykadimov7128 Thanks for the idea. I do have a video on next auth and credentials provider but that was with pages router. Maybe I'll make an updated one for app router ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-fqXC2V-MSV4.html
Thanks for the video👌I was able to setup Drizzle ORM in my Next JS project. Drizzle has 2 methods to connect to MySQL. 1. single client connection (await mysql.createConnection) 2. pool (mysql.createPool) I was unable to use single client connection method due to the error "await is only valid in async functions and the top level bodies of modules". So I couldn't use "await mysql.createConnection" method in index.ts file. what worked for me is pool method (mysql.createPool) in index.ts
Here's a solution if you want to use createConnection: 1̶. I̶n̶ y̶o̶u̶r̶ t̶s̶c̶o̶n̶f̶i̶g̶.j̶s̶o̶n̶, s̶e̶t̶ "t̶a̶r̶g̶e̶t̶" t̶o̶ "e̶s̶2̶0̶1̶7̶", "m̶o̶d̶u̶l̶e̶" t̶o̶ "e̶s̶n̶e̶x̶t̶" a̶n̶d̶ "a̶l̶l̶o̶w̶I̶m̶p̶o̶r̶t̶i̶n̶g̶T̶s̶E̶x̶t̶e̶n̶s̶i̶o̶n̶s̶" t̶o̶ t̶r̶u̶e̶ 2̶. R̶e̶n̶a̶m̶e̶ "i̶n̶d̶e̶x̶.t̶s̶" t̶o̶ "d̶b̶.m̶t̶s̶" 3̶. W̶h̶e̶r̶e̶v̶e̶r̶ y̶o̶u̶ h̶a̶v̶e̶ i̶m̶p̶o̶r̶t̶ {̶ d̶b̶ }̶ f̶r̶o̶m̶ "@̶/d̶b̶", m̶a̶k̶e̶ t̶h̶a̶t̶ i̶m̶p̶o̶r̶t̶ {̶ d̶b̶ }̶ f̶r̶o̶m̶ "@̶/d̶b̶/d̶b̶.m̶t̶s̶" M̶T̶S̶ (̶E̶S̶ M̶o̶d̶u̶l̶e̶ T̶S̶)̶ f̶i̶l̶e̶s̶ c̶a̶n̶ u̶s̶e̶ t̶o̶p̶-̶l̶e̶v̶e̶l̶ a̶w̶a̶i̶t̶ a̶n̶d̶ w̶e̶ s̶i̶m̶p̶l̶y̶ c̶h̶a̶n̶g̶e̶ o̶u̶r̶ T̶S̶ f̶i̶l̶e̶ t̶o̶ a̶n̶ M̶T̶S̶ f̶i̶l̶e̶ 1. In your tsconfig.json, set "target" to "es2017" and "module" to "esnext" 2. Make sure the Next.js version is higher than 13.4.5 3. Restart the dev server, if it errors out, delete the .next folder and then restart the dev server
@@MaxProgramming thanks so much for the solution. I did exactly as you said, but getting this error Build Error Failed to compile Module parse failed: Unexpected token (3:73) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. again thanks so much for your time bro!
@@MaxProgramming thanks for the response! I did exactly as your updated solution, and deleted the .next folder, restarted VSCode, restarted dev server but I'm getting the following error Unhandled Runtime Error Error: await is only valid in async functions and the top level bodies of modules thanks for your time bro, I'm trying to find a solution to this. If I find a solution, I will add a comment here.
Excellent guide - thank you. This approach really helped to roll-in Recaptcha as a supportive utility within form submissions processes through server actions.
Did anyone experience layout shifts and scroll issues when implementing this? When I use it to switch tabs on my settings page and let's say I scrolled b4 searchParams finished updating, It causes my layout UI to shift and and hides the top part of the layout. I think it's related more to the tabs components maybe tho....
You're right. The layout shift does happen when navigating from one tab to another. I guess that happens because the page gets re-rendered (as we navigate with Link component to modify the search params) Not sure what could possibly be the solution. But if I find one, I'll reply Thanks for pointing this out!
It's very similar to discord and there are a few minor changes... learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook?tabs=newteams%2Cjavascript
Hey Biniyam! I'm glad you liked the VS Code setup. I'm afraid I can't share the entire settings.json file as there's a ton of useless/old settings there so it's huge and mostly filled with useless settings. But feel free to ask for any settings and I'll help you out with that
Can you please use shadcn Command component for search, its awesome but commandlist / dropdown pushes other objects down on the page .. i dont know how to avoid that.
@@MaxProgramming let me explain. i have a website and discord and would like to receive notifications when a customer buy some think from my website or click the BUY button is that possible to make a simple webhook please but i dont know how?
@@UnitedCodManServices A webhook is a simple Rest API URL where you can send a POST request to call it. In the video, I mentioned how I did it for my website, you can do it similarly for yours 🙂
There are different ways to show a notification. You can show a toast message with react-hot-toast or some popover etc. It's as simple as writing the code for showing the notification right after the copy() function