2,522,966 questions
0
votes
0
answers
3
views
React.js Swapping Objects In useState Array
I have a state Array of objects as such:
const [slots, setSlots] = useState([
{id: 1, name: 'a'},
{id: 2, name: 'b'},
{id: 3, name: 'c'},
{id: 4, name: 'd'},
{id: 5, name: 'e'},
]);...
0
votes
1
answer
82
views
Function, If Else, Array Includes, Input...? [closed]
I'm trying to write it to that if the input includes a term within the maraQuery array, it'll open that page, otherwise, it'll say "No Results" under the input. All with auto-focus on the ...
1
vote
0
answers
44
views
The Y-point values on my line chart using Chart.js and jsreport are incorrect
In the screenshot you can see that the y-values are all suppressed to the x-axis. There is a correct curvature though so the values are doing something right. Why are they all so low though?
Here is ...
1
vote
0
answers
58
views
DatePicker return previous date selected [closed]
I used several jalali DatePicker like:
bootstrap:
https://github.com/Mds92/MD.BootstrapPersianDateTimePicker
jquery
https://github.com/majidh1/JalaliDatePicker
in all, on blur, at first selection it ...
0
votes
1
answer
106
views
Is this async-await scenario just a twist on normal function recursion or is something else taking palce?
The following example works as I'd like it to but I do not understand why and would like to know what the scenario is called. I coded it in my application over time without realizing it and, in review,...
Advice
0
votes
4
replies
108
views
JavaScript Execution
I am currently into MERN Tech Stack, while learning the concept one thing came into my mind that ,
" for executing JavaScript, browser have js engine right, like chrome has v8 and this v8 engine ...
Advice
1
vote
2
replies
70
views
Is there a way to create a script that can invite all users in a LINE group to a target LINE group automatically?
Is there a way to create a script that can invite all users in a LINE group to a target LINE group automatically?
Do you know if it's possible to develop a script that transfers or invites all members ...
Best practices
0
votes
5
replies
74
views
Appropriate way to make multiple client side (web) Google API calls with JavaScript/fetch and handle 429 errors
I need to write a pure client side JS function that will take in a potentially very large queue of Google API specs (URL, headers, body, content type, etc.) and fetch them. It will fetch 4 ...
-1
votes
0
answers
71
views
React component displays both minimized and expanded audio-player controls after the first click
I am building a simple static website to learn React, JavaScript, and Tailwind CSS.
I created an audio-player component that can be minimized and restored. The component generally works, but I am ...
Advice
1
vote
3
replies
57
views
How does React Router v7 choose between two equally specific matching routes?
I'm using React Router v7 and trying to understand how route matching works when multiple routes can match the same URL with the same level of specificity.
For example:
<Routes>
<Route path=...
-1
votes
1
answer
101
views
The mobile hamburger menu isn’t displaying or styling correctly with the current CSS [closed]
I'm trying to rework the dropdown menu of my site when it's in mobile view. First, I added the page view links to it. It took me a while to adjust the spacing with the social links, but now I can't ...
-3
votes
0
answers
94
views
Troubleshooting SoundtouchJS and web audio API, source does not play, pitch does not shift. Need assistance [closed]
I am trying a 100% frontend demo the example of soundtouchjs (formant correction worklet) (https://github.com/cutterbl/SoundTouchJS/tree/master/packages/formant-correction-worklet ( see the README) ): ...
2
votes
1
answer
81
views
Why doesn't registering a web component from the parent page in an un-sandboxed iframe work?
When
customElements.define(name, window.top.customElements.get(name))
is called inside a script (with type="module", in case that is consequential somehow) in an (un-sandboxed) iframe, it ...
0
votes
1
answer
102
views
How to render a property-based Svelte snippet with a pre-defined property value?
If I have a Svelte file with two snippets, one of type Snippet<[]> and one Snippet<[string]>, and I want to dynamically render the latter with a pre-defined state variable.
Here is a ...
Best practices
0
votes
7
replies
149
views
Is fixing child.prototype.constructor necessary in ES5 if we solely rely on [[Prototype]] check methods like Object.getPrototypeOf()?
When implementing the parasitic combination inheritance pattern in ES5, almost every resource (including Nicholas Zakas' book) insists on fixing the constructor property like this:
function ...