All Questions
Tagged with javascript next.js
12,301
questions
0
votes
1
answer
34
views
How can the input value be enclosed in a variable?
I'm trying to create a component that will have an input and a button. In input, the user enters his nickname. This nickname, that is, the input value, must be stored in a variable. This variable is ...
0
votes
1
answer
28
views
How to fetch data for Client Components on server-side
When I say Client Components -> I mean files that uses use client at the top of it, and Server Components — files that are using use server accordingly
Nobody says, how to fetch data on the server ...
3
votes
1
answer
20
views
Fix for AMP Error caused by the Imply script tag in nextjs App
Tag found outside the document head which is only allowed as a direct child of the document head.
Error:
Invalid attribute: data-amp-bind
Fix:
Ensure that you are using only allowed attributes for AMP ...
0
votes
0
answers
9
views
still giving error after using the use client on top in next.js component
× You're importing a component that needs useRouter. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.
"...
0
votes
0
answers
28
views
Environment Variables Not Loading Correctly in VSCode Terminal for Next.js Project
I work in VSCode on a Mac. Somehow, I found that my Next.js .env file isn't being loaded correctly. To debug this, I added some log statements in next.config.js to check if the environment variables ...
-4
votes
0
answers
28
views
When trying to draw 30,000 markers on a Google map, the page freezes [closed]
I have a project on next.js 14.
When I click on the button, I open a modal window where I draw a Google map on which there should be 30,000 markers of the delivery service.
If I draw 500, everything ...
0
votes
1
answer
15
views
nextjs import multiple components from index manifest imports everything
BACKGROUND:
I have a project where I have all my UI components in a /components directory.
Right now I export each component in its own file as:
export function Component1() { ... }
and import them ...
0
votes
0
answers
10
views
Nextjs - Get exported variable from page in a component
I have started to dig deeper in my application and I want to know if there is a way to get an exported variable from a page.js/ts/tsx from a component.
My idea is to have a menu component that will ...
2
votes
1
answer
73
views
How to set background color to transparent with Phaser 3
Trouble
I added two Text objects to a scene.
But for the latter one, I couldn't set background color to transparent.
Can anyone help me?
Here is the screenshot.
What I tried
I want the Text objects ...
0
votes
1
answer
19
views
Is there any solution to fix NextResponse.json() to use status:200 which it refuses to compile in a nextjs 14?
This is a simple API route I have:
// import prisma from "../../../utils/db";
import {NextRequest, NextResponse} from "next/server";
const addresses = [
{
id: 1,
...
1
vote
0
answers
19
views
Accessibility issue - the screen reader announces incorrect information after submission [closed]
I'm using NextJS and I'm having an issue with the Screen Reader. When the modal is opened, it reads everything correctly. However, after submitting the formik on the modal, it narrates the footer CTA ...
1
vote
0
answers
21
views
How do I impliment sort by using algolia in Nextjs
I am facing issue while adding sort by feature in my Nextjs project using algolia
useEffect(() => {
setLoading(true);
const index = algoliaClient.initIndex(ALGOLIA_INDEX);
const filters ...
0
votes
0
answers
42
views
NextJS state array is empty when accessed inside of functions but rendering items in the DOM
I have a state variable in my react app that stores an array of objects which are sent from a flask server then rendered in a list on the page. Inside one of my functions I need to access this array ...
0
votes
0
answers
17
views
Why not-found.tsx doesn't work on specific route?
I created not-found.tsx for the /blogs/[id] route, but for some reason it does not work exactly on that route. For the rest application global not-found.tsx works properly. Maybe it is because /blogs/[...
-1
votes
0
answers
27
views
How to Get Authentication Code from URL and Store Access Tokens in a React/NextJS App with 3rd party Integration? [closed]
I am building an online editor with React and NextJS. I want to add some extra functionality to make a connection with a third party (Strava). By adding this feature, the users should be able to see ...