useHistory().push() or direct <Link> #8185
-
How it is different to use |
Beta Was this translation helpful? Give feedback.
Answered by
Svish
Nov 4, 2021
Replies: 1 comment
-
Links are for links the user click on. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
akramnarejo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Links are for links the user click on.
push
is for when the navigation needs to happen programmatically. It could for example be used to redirect a user to a login-form if they need to authenticate, or when a user successfully posts a new blog post to automatically redirect the user to that blog-post, or back to the list of blog posts, or something like that.