2,522,285 questions
Score of 0
0 answers
48 views
Chance of conflicts using stateful classes
TL;DR: is it a bad practice to use a stateful JS class?
I am building a website using Node.js and Express, using MySQL as my DB.
To use the DB I have made a simple CRUD MySQL ORM to retrieve and save ...
Score of 3
1 answer
100 views
How can I open my game on the user´s mobile device from my website?
I want to open my game on the user´s device when the user visits my website and when the user has already installed my game on his mobile iOS/Android device. How can I open my game on the user´s ...
Score of -2
1 answer
107 views
Why is useContext(CourseContext) returning undefined in App.jsx even though App is wrapped with CourseContextProvider in index.js? [closed]
I have a CourseContext.jsx file that exports two things:
CourseContext: the context created with createContext().
CourseContextProvider: a provider component that supplies the context value to all ...
Score of -3
0 answers
99 views
Best way to store a JS accessible and amateur user editable spreadsheet
So I have an Excel workbook that stores multiple sheets of data, and I've been using basic HTML, CSS and JS code to make charts out of the data, which is read using the XLSX library for Javascript, ...
Score of 0
1 answer
55 views
How can a single-page web app let whitelisted IPs bypass OIDC login?
I'm creating a single-page web app, currently using oidc-client-ts and AWS Cognito for authentication, with static hosting e.g. by AWS CloudFront. (External users need to log in because OIDC tokens ...
Score of -1
2 answers
162 views
JavaScript for a collapsible which expands on click [closed]
I'm making some JavaScript for a collapsible which expands on click using max-height and the active class, but I have no idea what's wrong with my code, I put my <script src="/main.js">...
Score of 1
0 answers
58 views
Maplibre +three.js+3d-tiles loade 3d tiles from googleapi.com issue [closed]
I use MapLibre+three.js + 3d-tiles-renderer to load 3d tiles. I tried the code as the sample. The sample's 3d tiles source is from Amazon. I change the 3d tiles source to "https://tile.googleapis....
Score of 1
2 answers
56 views
Can Google Analytics plugin in React / Capacitor accept boolean event parameters, or should they be converted to strings or numbers?
I am using a Google Analytics plugin in a React app wrapped with Capacitor.
I want to track custom events that include boolean states (for example, whether a specific feature was enabled or disabled).
...
Score of -2
1 answer
89 views
What is difference between "self" from "self=super()" and "this"?
In response to the closing of this question, the meaning of self, here, is the return value of super() not the window.self. Therefore, I do not see how the linked post relates to this question. It ...
Score of 0
2 answers
99 views
What is the difference between link wrapping and 'use client' in Next.js?
Let's suppose we have two scenarios:
Link wrapping
<Link href="/voice_monitor" passHref legacyBehavior>
<Button component="a">Go to Voice Monitor</Button>
</...
Score of 0
1 answer
106 views
React use() cache gets overwritten by an older Promise after invalidation
I am using React 19.2 with Vite.
I am playing around with a small Promise cache for React 19 use() and I cannot figure out the best way to handle this.
So I start with one request and it takes 1.5 ...
Score of 1
1 answer
72 views
Firebase intermittent data fetch failure: WebChannelConnection RPC 'Listen' stream transport errored
I've been encountering an issue with Firestore while trying to retrieve data from my Firestore database using the Firebase web SDK. I've gone through my code, Firestore security rules, and CORS ...
Score of -4
0 answers
125 views
If the express module is a return function, then why cannot we directly call the properties of the function? [closed]
If the express module is a return function, then why cannot we directly call the properties of the function? Why do we call the
const express = require('express');
const app = express();
Score of -4
0 answers
130 views
Canvas Benchmark vs. Browser Profiler
TLDR; Firefox and Chrome show that my performance improvements made my game significantly slower. I made a benchmark that shows the opposite.
Background
I'm optimizing my HTML5 canvas game. I've read ...
Score of 1
1 answer
131 views
Can a shadow DOM host node be selected based on being a descendant of a node in the light DOM?
Is it possible to modify the style inside the shadow DOM to apply to a :host that is a descendent of div.state.open in the light DOM, for example, rather than as in the example using :host(.closed).
...