Skip to content
Advertisement

Tag: next.js

Apollo Client useQuery making un-necessary refetches upon Next.js router.push

I’m dealing with an issue in which a query inside a useQuery Apollo Client hook is getting un-necessarily re-run whenever Next.js’s router.push (docs here) is called. The abbreviated code is: You can see a reproduction on CodeSandbox here. My expectation is that whenever the button is clicked (and thus router.push is called), the query shouldn’t be re-run. However, it’s re-run

Tailwind animation plays twice when changing pages in Next.js?

I’m using react-hot-toast to show alerts & animate it while changing pages. The animation plays fades in twice when page changes. I’m using tailwindcss-animate in my tailwind.config.js to add animation classes. I’m only using 4 animation classes: animate-in, animate-out, fade-in, & fade-out I am animating a custom Success alert box. Success.tsx If you click the link in the demo below,

replacing createStore with configureStore

I updated my packages and VScode told me that createStore was depreciated. So I went about replacing it My store file, I have included the original line as a comment at the bottom Using redux App component With configureStore() the console is giving me a warning about putting non-serizible objects in state. They say its possible but when I try

Next-auth CredentialProvider config and redirect

I’m a bit confused on the implementation of the credentials provider and the redirects. The documentation says that the credentials provider doesn’t support a callback and its for the OAuth providers. This is fine. However, instead of staying on the page and flashing an error message or even logging in like in this video it redirects to https://localhost/api/auth/callback/[credentials-provider-name]. Which doesn’t

Advertisement