Dynamic MDX imports with Next 13 – Reactjs
Just followed the Next13 + MDX Tutorial, but I am still not sure how I can load my mdx files dynamically? I do not have my mdx files on some remote server, so I do not need next-mdx-remote. However, I…
Just followed the Next13 + MDX Tutorial, but I am still not sure how I can load my mdx files dynamically? I do not have my mdx files on some remote server, so I do not need next-mdx-remote. However, I…
I was trying to send a post request to my api. However trying to access the request body in the route handler causes the error below: Code: export async function POST(request: Request) { const postBody: postProps = JSON.parse(request.body) // 👈…
So I'm quite new to the NextJS space, I was using plain react before, but I've found the need for ISR, so I came to NextJS since its so far been an alright transition. What I have is the following…
I am working on a Next.js 13 project where I have a route named problems/[slug]. On the first level of this route (e.g., problems/react), I have a sidebar and a content section, which I am displaying using a layout.tsx. However,…
NextJS documentation (https://nextjs.org/docs/basic-features/fast-refresh) states: Fast Refresh is enabled by default in all Next.js applications on 9.4 or newer. With Next.js Fast Refresh enabled, most edits should be visible within a second, without losing component state. But it seems like this…
import { GetServerSideProps, NextPage } from 'next'; import Image from 'next/image'; import React from 'react'; import photo from '../../assets/photo.jpg'; type Products = { data?: { id: number; title: string; body: string; }[]; }; const defaultProducts: Products = { data: [],…
I was playing with the experimental Next 13 app directory. As per the documents, a client component can accept a server component, as long as it is as a children prop. It works, however I do get a type error…
I have a Nextjs application. The app will grow to a nice size (200 pages) What is the best way to manage links. Some pages will have navigation buttons and and hrefs, hyperlinks. I am looking for solution to manage…
I have a login form. The user types their username/password into the form and submits it. The form uses fetch() to send a request to the backend API and get a response back. I'd like to display a message from…