Category "javascript"

Animate component unmount fade-out in React Native

On a React Native application, given a condition is true I should render ComponentA, else ComponentB should be visible instead. const ParentComponent = () =>

sending props to @react-navigation/drawer component

I am trying to send prop to component inside Drawer.Screen. I am using @react-navigation/drawer. I finally send props to navigation container but I cant send pr

Swiper slider: slide change to other div

I have created a parallax slider but I have one big problem with changing the slider. I can change the slider when my mouse is inside the blue zone As you coul

Audio recorded from Chrome doesn't play on Safari

I'm building an app using React Js where it can record audio from users, upload the file or blob to cloud storage, and play the recorded audio from the file URL

Performance of getElementById vs. getElementsByClassName vs. querySelector

I was reading about dom manipulation topic in dev.mozilla and I came across with a statement that suggest us to use querySelector for element selection: Not

node.js req.body returning undefined

EDIT: @LawrenceCherone solved this, its (req, res, next) not (err, res, req) I am creating a MERN app (Mongo, express, react, node). I have some routes that wor

Error: The type cast expression is expected to be wrapped with parenthesis when using get function

im new to javascript and im trying to make a get request to a youtube API. I have preconfigured a few things related to the request before making it using axios

Ethereum - insufficient funds for intrinsic transaction cost

I'm trying to create my own NFT contract factory, but it fails in mainnet. I have ETH on my wallet. In test it works fine. Here's my contract: //Contract based

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