Skip to content

Tag: next.js

Nested routes authentication in NextJs

Is there any way we can Authenticate all the nested routes ? In my project I have routes which needs authentication and routes which can be accessible without authentication. For eg. /admin => needs authentication /admin/posts => needs authentication /admin/posts/1 => needs authentication /admin/user…

NextJs doesn’t rerun scripts

When I use the <Link> tag in NextJs to navigate between pages it doesn’t rerun my scripts after changing pages. It only runs the scripts after the first page load or when I press reload. When using plain <a> tags instead, it works fine because the page reloads after each navigation. As far a…