Link / useRouter difference
Unanswered
Great Skua posted this in #help-forum
Great SkuaOP
Hello,
As a beginner, I still don't understand when I should use Link and when useRouter, in both cases I apply a url for internal navigation (
Can anyone tell me when I should use each of them?
As a beginner, I still don't understand when I should use Link and when useRouter, in both cases I apply a url for internal navigation (
/menu/1)Can anyone tell me when I should use each of them?
2 Replies
Asiatic Lion
You should probably use Link whenever applicable and useRouter if Link is not an option. As far as I understand useRouter requires client side JavaScript while Link does not.
American black bear
I understand the difference between Link and using a router, as different usages. I personally use Link for elements which should be clickable on the UI (navigations, links, etc...) and use router redirection when I want to redirect a user from my function on some actions(for example when he finishes some form)