2,526,697 questions
1
vote
0
answers
30
views
Stale props in client component embedded in ISR-rendered server component
In a NextJS16+ app using app router, assume the following server component:
const getData() = async () => {
"use cache";
cacheTag("data");
return databaseCall();
};
const ...
Advice
1
vote
0
replies
23
views
Matter.js for Pong
I've been trying to recreate Pong (1972) using Matter.js for one of my midterms, and I've been stuck on how to get the ball to move around. I've been having a look at the demos on the website, and ...
Tooling
0
votes
2
replies
40
views
JavaScript access on an HTML grid
Is there a JavaScript equivalent to the rows[] and cells[] properties (usable on HTML tables), but this time to access the elements of an HTML GRID ?
// actualy for a table:
document.querySelector('...
Best practices
0
votes
2
replies
60
views
How can we use AI, and what is the main purpose?
My meanings and thoughts are related to pure purpose. Also, in particular case what about the JavaScript projects. Best practices to integrate. Can we use it in old projects or the best ways are ...
-4
votes
1
answer
43
views
How to check if value is valid for a number input [duplicate]
When assigning a value to a number input via JS, is there a way to validate the value to meet the input's requirements - min, max and step - without doing it manually.
For example, consider this input
...
-4
votes
0
answers
40
views
Nuxt v3 and Nuxt v4 error __dirname is not defined in ES module scope
Windows 10
Node.js v24.11.1
Npm 11.6.2
Yarn 1.22.22
when executing this command npx nuxi init App
im getting the error
`
file:///C:/Users/me/AppData/Local/nvm/v24.11.1/node_modules/nuxi/dist/info-...
1
vote
2
answers
50
views
Trying to flip cards in JavaScript, stuck trying to pass data to the function to flip them
I can get these cards to flip on hover, but not on clicking on them. I'm trying to make a memory match game but I can't seem to get the Flip function to get the data it needs to flip the card that is ...
0
votes
1
answer
83
views
How to place a div over entire screen? [duplicate]
I have a simple webpage with one button and one or two div elements inside it.
When I click the button, I want one of the div elements to take over the entire screen (physical monitor). Currently, it ...
-1
votes
0
answers
21
views
HMR Failure: Component Changes Not Forcing Visual Redraw
I am encountering an issue with Hot Module Replacement (HMR) in my Storybook environment while developing with React Konva and Vite.
When I change code in my custom Konva shape component (KonvaElement....
-5
votes
0
answers
30
views
Next.js 14 ignoring my API route completely even though route.ts exists and is named correctly
I'm facing a strange issue in a Next.js 14 (App Router) project.
My API route exists, is named correctly, and the folder structure follows the official Next.js documentation, but the route is still ...
-2
votes
1
answer
54
views
THREE is not defined (latest versions)
I'm trying to get three.js working via CDN with this in my HTML as explained on their installation page
<script type="importmap">
{
"imports": {
"three": &...
0
votes
0
answers
76
views
How to disable other apps from drawing over mine?
I am making an Android quiz application where I need to disable other apps from drawing over mine, to reduce cheating (i.e. chat heads and bubbles).
Are there any plugins, app-properties, or ways to ...
-5
votes
0
answers
72
views
Building an installation script for a single CLI with React Ink and a python core backend
I'm looking for a method to seamlessly install an application that has a react interface (or front-end) and a python processing where the communication could be through json-rpc or IPC.
We can do npm ...
0
votes
0
answers
17
views
Chainlink Functions: Spotify API returns 400 Bad Request (x-www-form-urlencoded issue in Deno sandbox)
I am developing a Chainlink Functions (v0.3.x) request to fetch artist data from the Spotify API. I am simulating the request locally using the Chainlink Functions Toolkit (simulateScript), which runs ...
Advice
0
votes
1
replies
34
views
CSS badge shifts to the right inside Forminator form when injected via JavaScript (flex alignment issue)
I’m working on a WordPress page that uses the Forminator plugin to generate a multi-step form.
After the user spins a prize wheel (custom JS), I inject a badge element directly under the “Total” ...