nextjs-dynamic-routing Questions

3

Solved

I am developing a Nextjs app and would want to direct user to another link using router.push but I do not know how to open the link in new tab. My code is like this right now: import { useRouter } ...
Pipette asked 23/11, 2023 at 7:43

2

Solved

With the old pages router, I could await router.push. I used this to keep a button disabled while we are in the process of navigating to another page: async function onSubmit(input: CreatePostForm...

2

Solved

In Next.js, I'm facing an issue where when I click on a link to open a new page, the new page opens at the same scroll position as the previous page. For example, if I'm on a product listing page a...
Stockwell asked 7/6, 2023 at 5:57

2

Consider the following server side component that's part of some page (page.js) in the app directory, representing a person: export default async function Person({ params }) { const person = await...
Melmela asked 24/6, 2023 at 1:53

0

In my Next JS build, I have multiple website which have common Components and API's, they only differ in their design and layout. Each website has its own static hosting. Colors, logo etc can all b...
Oberhausen asked 5/8, 2023 at 21:57

2

Solved

I have an page '/message/:id' with a back button on top left which routes back using router.back() function, Which works perfectly fine when i get routed to that page from any other screen. But now...
Found asked 19/7, 2023 at 22:55

1

Solved

I'm using the latest version of Next.js (13.4) with the new app router. In my application, I have a Link component with a button inside a ../components/products.tsx file. Each product has a "d...

1

Solved

I have an API route that generates data in my DataBase, this API route is only called in my CRON job set in Vercel. However, every time I build the project, new data show in the database. I do beli...
Vladikavkaz asked 2/6, 2023 at 15:10

0

I have been having a little issue for a while concerning dynamic routes in Next.JS. After seeing a few tutorials an reading some documentation, I have the feeling that what I experiment is not what...

1

Solved

I have successfully used pages/api routes in previous versions of NextJS to connect to AWS API Gateway. I'm trying to use new app router to do the same thing in app/api/route. But I'm unable to get...

0

I cannot figure out how to retrieve the original URL request from a Next.js redirect. Actually the code works as expected on my local server, but the information disappear on production. My next.co...
Carbylamine asked 8/11, 2021 at 16:16

0

I have a multi-lingual application that I use exportPathMap but I want to transition to getStaticProps and getStaticPaths. My structure looks like so: pages/[language]/[app-slug].js However, [app-s...
Maryjomaryl asked 5/10, 2021 at 22:22
1

© 2022 - 2024 — McMap. All rights reserved.