Next.js Discord

Discord Forum

clientside redirect to a page without a full reload

Answered
Japanese Bobtail posted this in #help-forum
Open in Discord
Avatar
Japanese BobtailOP
i tried using a Link tag and router.push from next/navigation, but it still results in a full reload. how can i make it not reload and just redirect?
Answered by Z4NR34L
Are you testing it on dev environment or preview/prod? 😄 as there is small difference that on dev router.push can cause full-reload via hrm
View full answer

12 Replies

Avatar
Are you testing it on dev environment or preview/prod? 😄 as there is small difference that on dev router.push can cause full-reload via hrm
Answer
Avatar
Can you bring to us code with link or reproduction?
i saw in the console [HRM]
how can i test it as preview/prod?
                                            <Link
                                                key={index}
                                                className={`text-900 p-3.5 text-md rounded-lg hover:bg-[#3B3F4B]/30 max-w-full transition-all duration-150 ${section.hover.color}`}
                                                href={`/test`}
                                                // shallow={true}
                                            >
                                                <FontAwesomeIcon 
                                                    icon={section.icon} 
                                                    className="mr-4 transition-all duration-150"
                                                />
                                                {section.name}
                                            </Link>
Avatar
@Japanese Bobtail how can i test it as preview/prod?
Avatar
Japanese BobtailOP
nvm
Avatar
haha
so for 90% that's your issue 😄
deploy it to vercel, access URL and test if it's still happening
let me know if that solved your issue, if not feel free to ping me 😄
Hapy that helped! Have a nice time