Category "javascript"

React-map-gl with mapbox on NodeJS map -- map is not showing up

I was following a youtube tutorial and followed the steps exactly, however, my map does not seem to work. I get a blank screen even when I put my own access tok

React Native map with Google API, Search bar is not compactable with screen width

This is the code for React Native Map using Google Map's API. import React, { useEffect, useState } from 'react'; import { PermissionsAndroid, StyleSheet, View,

How do I parse a Playfab GetLeaderBoard request result?

I'm trying to work with the PlayFab JS API to set up a leaderboard in my game, and once I retrieve the leaderboard I can not figure out how to parse the returne

Javascript click event not reverting according to my statement

I'm trying to revert my click event after clicking but my else statement seems not to be working, I do not know if something is wrong with my code: var img = do

Not able to send files data from front-end (react.js) to back-end (node)

I have an application that stores to its state files' content, whether images, audio or both, as shown here with the mediaAudio object key: In my react.js code

Filter an object by value from array [duplicate]

I have an array of object b and an array a. I would like to filter b to only have objects where the to values are in a. I've tried many ways b

Randomly Populate table rows in Pug files

Until this morning, I did not know what Pug is. However, now, it's being used in a theme that I am using for work. Ran into this situation. The current pug file

MUI Radio button disabled change value when Select drop down changes

My problem is that when I change a value in a dropdown I want to disable two radio buttons and change to the correct radio button. I am able to disable the radi

Match variable value to array's index to get month

example of getDepart date format getDepart = 2022-04-29 desired result 29 APR, 2022 const getStringDepart = () => { const months = ["JAN", "FEB", "MA

How to test webflow website without publishing

My client built the website using webflow but there is a bug in there. I tried to find a way to test the code (console.log etc) but seems like the only way of d

ManifestV3 new promise error: The message port closed before a response was received

I'm working on an extension that does a lot of message-passing between its content scripts and the background service worker (manifest V3), and I've noticed an

CDK drag-drop is not working in Tablet device

I'm trying to use the Angular Material CDK Drag-Drop module from https://material.angular.io/cdk/drag-drop/overview It is working in desktop device but it is no

Trying to loop through firebase and display each object as a card React

My data is structured like so [1]: https://i.stack.imgur.com/dWsr3.png I am trying to loop through the database and put the data from each card into props for m

Next.js Navbar gives a warning of Target Element not found when clicked

I am currently working on a next.js app, which contains a connect wallet button found to the right of the navbar, with the navigation links to the left of the n

Firebase logs "undefined" on console when it should not

I am using firebase 10.9.2 (Latest version) I use the onValue function to go through the data in my live database. For some reason, it always logs (and is set t

Javascript Custom Array.prototype.method logs 'not defined' [duplicate]

So, I've never done this before, trying to add a method to the Array.prototype. See console.log statement below for usage. It keeps telling

How to move local File object in and out of Shared Array Buffers JS

I have a web worker running in a while(true) loop, the code is too deep to change it at this point in time. The worker can access a Shared Array Buffer, I have

Is there a way to override what useMemo does to determine if there's a change?

useMemo(() => expensiveFunction(), [deps]) re-executes the expensiveFunction when the deps have changed. I was wondering... is there a way to control how Re

Disabling Ctrl+T in web browsers

I'm stuck with a shortcut problem. Javascript is not a language I've used much, and the answers I've searched didn't help. I'm creating some tutorials for a spe

Gender radio input and fields of interest checkbox undefined in alerts

Can anyone help me why the gender and fields of interest output are undefined? I can't seem to get it no matter how I get the value and its getting out of hand