Category "next.js"

How to solve redux-persist failed to create sync storage. falling back to noop storage. in nextjs

Here is the version am using => "redux-persist": "^6.0.0", Error: => redux-persist failed to create sync storage. falling back to noop storage.

Next js getServerSideProps redirect with props

Can I get the props after redirection? return { redirect: { destination: '/auth-page', permanent: false, }, props: { initialReduxState: {user}

How to use cookie inside `getServerSideProps` method in Next.js?

I have to send current language on endpoint. But getting language from Cookie returns undefined inside getServerSideProps. export async function getServerSidePr

Render error when using swr within react component

I am currently creating a blog and I am trying to add a viewcount to my blogposts. import { useEffect } from 'react' import useSWR from 'swr' const fetcher = (

Getting req.headers is undefined when trying to read from req object in NextJS

On page load, I try to fire off an authentication request if a token exists in local storage. // utils.ts const init = async () => { try { const

how to on-demand revalidate all the pages at once

I'm trying to revalidate all the pages of my website on a certain event, the problem that I'm running through is that I have to do it page by page : ... try {

Next.JS - Access `localStorage` before rendering page

Let's say I have a user's account information stored in localStorage (client side). I need my Next.JS app to render the webpage's navbar based on what's stored

how to re-register the service worker with next-pwa

I am using next-pwa package with my next.js applications for PWA features. But I am having a problem here. Everytime, I rebuild and redeploy the application, it

Document is undefined when using apollo query with next.js getServerSideProps

I am trying to use getServerSideProps to fetch a query every time this component is rendered using apollo and next.js export async function getServerSideProps(c

Register is not a function when passing as a prop?

I use react-hook-form for the first time. I was reading the docs and followed along. Likewise, I already laid out my components and styled them. Now I am trying

Features work, but console delivers extraneous error: "Variable "$id" of required type "ID!" was not provided."

My CRUD operations work. But many of them also generate a single, specific console error I haven't been able to track down. [GraphQL error]: Message: Variable

Passing query params or body with NextJS + Auth0?

So, my knowledge of next and JS in general is extremely minimal as is my Auth0 knowledge. I was wondering if anyone could suggest how to pass query parameters o

Is there a way to integrate Django with Next.js?

I've integrated Reactjs with Django by having a function to access build/index.html. The below codes show how I do that. config/urls.py urlpatterns = [ ..

How can I get the all html code into view page source as I am developing a project in NEXT.js

I am developing a project where i am using NEXT.js but there i am getting a issue like i am not getting the all html value in view page source. I think my probl

FCM - web Token getting generated in my account but if i am login with some other Gmail account in chrome then it will throws Error

Other than my registered Gmail account I will be getting the below error in the chrome browser perhaps token getting generated if I log in with my email id in c

Is this Next.JS folder structure recommended?

We have resorted to this following project structure |- pages |- <page_name> |- index.js # To do a default export of the main com

Next.js document is not defined trying to implement locomotive-scroll

I'm trying to implement Locomotive Scroll in my Nextjs app, and I'm having trouble... Here's my code: import type { AppProps } from "next/app"; import { useEffe

How to enable pop-up iframe work on same page in react nextjs app

I have a pop-up that works very well in my vanilla Html app properly, that is, when the button is clicked, it opens the pop-up and everything works fine. The is

Error: Do not use <img>. Use Image from 'next/image' instead. - Next.js using html tag <img /> ( with styled components )

I know that in Next.js we have Image component, but the problem I have with it is that I can't use it as a normal HTML tag like <img />. I have to give it

I am trying to create widget in next.js app

My website is almost complete on next.js. I am trying to create widget to one of my component that can be embedded on any website without iframe. Please help me