Created
November 29, 2023 16:06
-
-
Save klaasvw/ff85cbd703492ad06be5150307cbd59e to your computer and use it in GitHub Desktop.
Access Next.js basePath without hooks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Router from "next/router"; | |
export const functionName = () => { | |
console.log(Router.basePath); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment