clientside redirect to a page without a full reload
Answered
Japanese Bobtail posted this in #help-forum
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
12 Replies
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
Can you bring to us code with link or reproduction?
@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
Japanese BobtailOP
its using hrm i think
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>
@Japanese Bobtail how can i test it as preview/prod?
Japanese BobtailOP
nvm
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