Skip to content

Tag: next.js

Axios is returning empty string value

The problem I’m facing here was, whenever I fetch the data with a button click (the button that leads to this route), the data will be fetch successfully, but whenever I input the link address directly myself in the browser, It keeps returning empty string when i console.log the data (Like this <empt…

Nextjs UseEffect is not rendering on route change

I am having problem with a useEffect inside a component which is in every component. I have made some authentication and redirects in that component but I figured that when I use Nextjs link or the go back button from the browser, the Layout useEffect is not re rendering which means it is not checking if the …

next js className haven’t been set

I’ve just started playing with next js. so I want to use css as module and setup classname for nav, but in rendered DOM this classname doesn’t exist. I can see generated styles by webpack in “head” tag, but I dont see classname on my nav tag. Answer In JS, we cannot use – as a va…