TypeScript DOES NOT like Async React Server Components in Nextjs โ here’s a fix ๐
Hey, developers! Next.js React Server Components are pretty awesome. TypeScript, as you can imagine, has a small issue with them. You might have encountered the “‘Promise<Element>’ is not a valid JSX element type” error. But fret not because there’s a quick fix!
In this OneDevMinute video, I’ll show you a simple workaround to disable type-checking for async Server Components. With one step, you’ll be back on track.
Check out the video now to save time and stay productive! And if you find it helpful, don’t forget to hit that “Subscribe” button and leave a reply.
Happy coding, folks!ย
Lovely jubbly, now you know!