Skip to content

useHistory().push() or direct <Link> #8185

Closed Answered by Svish
akramnarejo asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by akramnarejo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants