Skip to content
Advertisement

Tag: next.js

why I can’t delete .next folder in nextjs project

I run my nextjs project by NOT but it automatically create the .next folder. and after I tried to delete that folder but it automatically generated again. why?? I don’t expect to generate the .next folder by this command: Answer You are running your project with Once the project is launched, .next folder will be created to store page cache

How to pass as a props an array of String and JSX with NextJs?

i passed as a props an array of strings an JSX but there is an error message “Missing “key” prop for element in arrayeslintreact/jsx-key ” I’m doing all of that to just try to color the text “Trusted” with different colors and not change the div dynamic Answer You’re passing your props in correctly, it’s the react/jsx-key ESLint rule that’s

how to pass an object as a prop in nextjs

I cant quite figure out how I am supposed to pass an object as a prop when using useState in Next JS. I have a lorem ipsum generator that I created in javascript functions. I have a component called Paragraphs that houses it. I need to pass in two properties, a number of paragraphs. a sentence length. The paragraph length

404 on page refresh in NextJS with p5.js

I’m using the react-p5 library for generating PerlinNoise wave animation in my about page. When I use the p5 on any page it returns a 404 page, but if click back to the home page and open about.js using the link it will work. After refresh, it won’t work. Everything works if I remove the p5 component from the file.

Best way to include reusable SVG in React

I am including SVG as reusable component on my react application. Sample of SVG component is as follows On page level, I am importing IconComponent and reusing it. Is there any other best way to include reusable SVGs in React pages which improves performance/page load? Answer 1. SVG with webpack command line webpack.config.js then 2. SVG as component also you

Getting OAuthCallbackError with nextjs Auth

I am trying to make a spotify analysis app that would analyse your Spotify data. But I am getting this error on authorization. Here is my auth file. this is my middleware this is my login.js It would be really great if someone could help me out here. Everytime I am trying to login,it’s throwing me this error.(http://localhost:3000/login?callbackUrl=http://localhost:3000/&error=OAuthCallback) Answer I

How to list out NextJS router param array

I have a NextJS catch all route which pulls in And retrieves all the parameters: If I log the params value I see all the URL path elements in the console. I would like to repeat out all the params values in an unordered list: But this outputs nothing. There are no elements displayed. How can I get this to

Next-Auth Signout within jwt callback

If a user is signed into the app between app upgrades, then I want to sign out the user the next time they visit. I am pulling the version in from the package.json and storing it in the jwt/session to have for comparison of which version the user authenticated from and what version is now running. This works, but it

Advertisement