Category "javascript"

loadable-components: failed to asynchronously load component

I have created module A which is a component library for my React App. Which I plan on using on module B which is my actual React App. I have an index.js whereb

How do I fix the POST 405 error for an email form (PHP) hosted on http-server?

I am new to PHP and jQuery. I wanted to test the functionality for the email contact form in PHP that I call from my jQuery file. I have been filling in the det

ScrollView programmatically scroll on button press in react native

So I manually created an onboarding screen in React Native using ScrollView and also I added a button labeled next to enable the hidden screen to move in on the

Can't solve No 'Access-Control-Allow-Origin' in React App(I have only front-end)

Using Rapidapi API and trying to fetch dynamic data from this endpont https://www.freetogame.com/api/game?id=${number} at the end getting CORS error. UPDATE: I

How to appear two Stripe Element on a single page

I would like to use two payment forms(stripe.js) on the same html. Only one if can be specified, so the payment form that is called first will be appeared, but

How to make Next.js "see" the react-dom package?

This is my first ever Next.js project, and I encountered an odd obstacle. Even though I made sure at least 3 times that I have react-dom and react installed and

Why use triple-equal (===) in TypeScript?

In JavaScript, it's commonly seen as best practice to use === instead of ==, for obvious and well-known reasons. In TypeScript, which is one to be preferred? I

How to rename iterably object properties

Every Object properties have underscored the first letter; I wanna delete this first substring, and try the string method "replace" to all object properties, bu

work with d.ts with a different folder for js (pdfjs-dist)

Currently pdfjs-dist https://github.com/mozilla/pdfjs-dist/tree/bd2a6cd87f9e0c3a9b3197d5d27acfb99886629b contains the d.ts and js files in separate folders: htt

VS Code Set JavaScript Property color

I'm trying to figure out how to change object property colors in JS files in VS Code. For example: var vehicle = { type: "Fiat", model: "500", colo

How to deal with multiple async calls in the Wikipedia API

I want to find all the links contained on a Wikipedia page, but how can I get around the async execution? The below code fetches a list of page links. That I ca

How to check pending schedules in queue schedular of RxJS?

I am using this code in for loop: my purpose was to once I get response of 1st request then only it should execute second request then 3rd and so on. queueSche

TypeError: navigation.toggleDrawer is not a function. (In 'navigation.toggleDrawer()', 'navigation.toggleDrawer' is undefined) this error occured

TypeError: navigation.toggleDrawer is not a function. (In 'navigation.toggleDrawer()', 'navigation.toggleDrawer' is undefined) I've called this function as chil

UseEffect API Request not displaying on page load

Apologies in advance if similar questions like this have already been answered. I have tried everything, but still cannot figure out why I am experiencing this

NextJs router seems very slow compare to React Router

I have a website built in React Js and the same one on Next Js as well. The problem which I am facing right now is, the router seems very slow in the nextJs com

Testcafe request with cookies

I am trying to find a method in testcafes API similar to Cypress' request. Cypress' request will attach any cookies to the request that already exist in the b

Scratch card game with non-repeat array

This is a scratch card game I modify using script from https://jennamolby.com/interactive-scratch-and-win-landing-page-tutorial/ . I was trying to make a scratc

Comparing two strings, find the indexes of added words, ignoring "edited" words

Is it possible? With no library's or memory of the changes as they're made? The example I'm showing below is probably more edited than the text I will be evalua

import.meta.glob() can only accept string literals

I have a vite vue3 project. In the component I try to get the URL of all images from a folder. It works when I write const images = import.meta.globEager("/src

Firebase-admin Firestore node.js share logic with modular v9 js sdk

What is the recommended way to share Firestore api logic (between the admin node.js and the js web) when upgrading to the web v9 modular sdk? The way I did it b