Loading video...

Video Failed to Load

Go Home

How to show inline loading indicator when updating search params in Next.js (App Router)

61,834 views • 1 year ago •via X (Twitter)

9 Comments

Dan Skiba's profile picture
Dan Skiba1 year ago

I prefer progress bar at the top of a page and for that reason I've created lil hooks demo:

Ollie Martynov's profile picture
Ollie Martynov1 year ago

Ah yes. The good old transitions api

Tomas Jansson's profile picture
Tomas Jansson1 year ago

An even more general approach would be to wrap link and add a (discrete) loading indicator for all navigations. Very nice though! It is so nice to see how you communicate simple examples!

marcog🧉's profile picture
marcog🧉1 year ago

useTransition is a native hook from react?

Coding With Mr.M's profile picture
Coding With Mr.M1 year ago

Nice , but just to add if we use @tan_stack then we no need to use that, we can just use the mutation.isLoading

Matt's profile picture
Matt1 year ago

Man this is gold I didn’t know u could do this 🤯

Kiran's profile picture
Kiran1 year ago

Nice, i'm using the same but with nuqs to update the search params.

elsie's profile picture
elsie1 year ago

hi Alex, how to display tailwind icon when we short the line of code ?

Umair Ali's profile picture
Umair Ali1 year ago

If we want the same on pages route?

Related Videos