Active nav link in next.js

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

thankyou so much.. finally i can solve my problem.. keep making tutorial bro

firmanalmadhani
Автор

Big support bro.
Nice and simple. You did good.

JustPerfectDesigns
Автор

You pretty explained but lets say if page 2 has nested routes then this condition will get failed. i.e. localhost/page2/1. The orange classes needs to be added on page 2 but would not come

kushkhurana
Автор

so what is i have a slug how do i specify the href

MatthewFrancis-nsps
Автор

I see you're using Tailwind css, so in that case, can't we use their built in active: classes?
Do they not work? Like do we need to explicitly check whether a link is active or not?

blackpurple
Автор

does this work in the same way if im using tsx?

jsiqueiraest