How to intercept ALL routes ?
Answered
Eurasian Blackbird posted this in #help-forum
Eurasian BlackbirdOP
Hello ! I'm trying to create a transition page (IE, everytime a <Link> is clicked, it display a short animation and then go to the link).
I thought about using intercepting routes (https://nextjs.org/docs/app/building-your-application/routing/intercepting-routes) but when i just put a folder named "(.)" inside root directory, or even "(...)" it is not catching any routes...
I thought about using intercepting routes (https://nextjs.org/docs/app/building-your-application/routing/intercepting-routes) but when i just put a folder named "(.)" inside root directory, or even "(...)" it is not catching any routes...
Answered by Clown
Ok i so have never used Intercepting Routes but i dont think that's what these are used for.
They are literally used to display, lets say a preview of another route on top of your current route without switching context.
They are literally used to display, lets say a preview of another route on top of your current route without switching context.
3 Replies
Ok i so have never used Intercepting Routes but i dont think that's what these are used for.
They are literally used to display, lets say a preview of another route on top of your current route without switching context.
They are literally used to display, lets say a preview of another route on top of your current route without switching context.
Answer
Unfortunately i dont know how to achieve what you want to achieve either. It maybe possible by using a useEffect and then checking the changes in root and doing some action but i honestly have no experience in this so this is all i can help you with
Eurasian BlackbirdOP
You're right, i got it wrong that's not what their used for. I found how to do it with template instead