Skip to content

[next/navigation] Next 13: useRouter events? #41934

Answered by leerob
waltergalvao asked this question in Help
Discussion options

You must be logged in to vote

Hey everyone, I appreciate your patience here while we worked on a reply. Thanks for answering some of the questions I asked as it helped us collect a list of current solutions. Please let us know if this helps!

Current Solutions

Displaying a progress indicator while a route transition is happening

All navigations in the Next.js App Router are built on React Transitions. This means you can use the useTransition hook and use the isPending flag to understand if a transition is currently in-flight. For example:

'use client';

import { useTransition } from 'react';
import NextLink from 'next/link';
import { useRouter } from 'next/navigation';

/**
 * A custom Link component that wraps Next.js…

Replies: 65 comments 178 replies

Comment options

You must be logged in to vote
6 replies
@thelonewolf123
Comment options

@Fox32
Comment options

@dstarosta
Comment options

@NK3678
Comment options

@iamsabbirsobhani
Comment options

Comment options

You must be logged in to vote
4 replies
@tinnohofficial
Comment options

@petedegraw
Comment options

@pbs-jmo
Comment options

@NourAlzway
Comment options

Comment options

You must be logged in to vote
2 replies
@joe-pellegrino
Comment options

@a95tbirdsc
Comment options

Comment options

You must be logged in to vote
3 replies
@saeideh-abs
Comment options

@stevenlafl
Comment options

@aminrms
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@pfischer1290
Comment options

@fdev
Comment options

@neilpoulin
Comment options

@fabb
Comment options

@SalahAdDin
Comment options

Comment options

You must be logged in to vote
1 reply
@pfischer1290
Comment options

Comment options

You must be logged in to vote
3 replies
@Fiontan
Comment options

@iamsabbirsobhani
Comment options

@JannikZed
Comment options

Comment options

You must be logged in to vote
4 replies
@samuhmatos
Comment options

@neilpoulin
Comment options

@SalahAdDin
Comment options

@JannikZed
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@samuhmatos
Comment options

@praveennagaraj97
Comment options

@samuhmatos
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@samuhmatos
Comment options

Comment options

You must be logged in to vote
5 replies
@MarcoBeyer
Comment options

@reo-yamashita
Comment options

@samuhmatos
Comment options

@pfischer1290
Comment options

@samuhmatos
Comment options

Comment options

You must be logged in to vote
3 replies
@anarkrypto
Comment options

@VCasecnikovs
Comment options

@UnCor3
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@leerob
Comment options

@spacecat
Comment options

@leerob
Comment options

@spacecat
Comment options

Comment options

You must be logged in to vote
11 replies
@leerob
Comment options

@carlos-dubon
Comment options

@fabb
Comment options

@NourAlzway
Comment options

@Irrelon
Comment options

Comment options

You must be logged in to vote
2 replies
@carlos-dubon

This comment was marked as spam.

@NourAlzway
Comment options

This comment was marked as off-topic.

Comment options

You must be logged in to vote
2 replies
@sovetski
Comment options

@NourAlzway
Comment options

Comment options

You must be logged in to vote
2 replies
@GrahamQuan
Comment options

@SalahAdDin
Comment options

Comment options

You must be logged in to vote
1 reply
@alexblazevski
Comment options

Comment options

You must be logged in to vote
1 reply
@NourAlzway
Comment options

Comment options

You must be logged in to vote
4 replies
@fabb
Comment options

@zalog
Comment options

@SalahAdDin
Comment options

@zalog
Comment options

Comment options

You must be logged in to vote
1 reply
@Op-Pautu
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@fdev
Comment options

@ThulinaWickramasinghe
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet