set active className on Link in _document #15872
Unanswered
omar-dulaimi
asked this question in
Help
Replies: 1 comment 3 replies
-
Why do you want to do it in |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm looking for a way to set active tab style on Link elements defined in the custom _document. What I found online is ways that use the router to get the pathname and set the active class based on the href if they're equal.
So far the router always returned null, and I read in the docs that _document only runs on the server.
Do you think there might be workarounds for this??
Beta Was this translation helpful? Give feedback.
All reactions