Category "javascript"

Ajax chained dropdown not loading/working correctly on the LIVE server

I have a country, state and city chained dropdown which loads a state depending on the country and loads the cities depending on the state. The code works perfe

Hydration error due to if statement in Next.js [duplicate]

I am getting three errors due to the if statement in my _app.js file. Error: Hydration failed because the initial UI does not match what was r

Changing video-background based on weather description using React

I am trying to have it so that the video background of my weather app will change based on the weather condition using React. This is my App.js import React

"Warning: Cannot update a component" when creating a user with Firebase react hooks

In my React App I want to create a user with Firebase react hooks using createUserWithEmailAndPassword authentication but I get these errors. Error 1 POST http

Why can't I directly modify a component's state, really?

I understand that React tutorials and documentation warn in no uncertain terms that state should not be directly mutated and that everything should go through s

Javascript share sessionStorage among tabs

I am using Javascript with Chrome and I need to share the sessionStorage content among different tabs. I know that i could use localStorage but I don't want to

Select products indiviudally in react js

the component holds a bootstrap cart inside and my button is rendered inside that cart to be specific. how to edit each one of the buttons individually enter im

How to load a 3D model with Collada using NASA Web World Wind?

I’ve been working with NASA’s World Wind library and I am currently trying to display a 3D model of a tree on top of the globe. I am following this

How to add if statement in arrow function

i'm a beginner in JS and was wondering what is the syntax of an arrow function with an if statement with a regular function such as function getStringLength(str

How to type unique letters only in input text box in html or react?

I want to create an input box that allows to type only a distinct alphabet letter in the input box ( No duplicate alphabet value, ONLY ONE) I looked up all the

How to add styles to individual elements in react using e.target, when a button is clicked?

I am trying to add styles to the inidividual elements. I want when an individual div( is clicked to make sure that the paragraph of the specific changes from d

Material UI DropDown Focus Remove

I want to remove the focus background color for the target dropdown <Dropdown options={branding} fullWidth id

Prevent multiple fast clicks from triggering API

For my project a instagram-clone, I have a like and dislike button. If there are no likes or dislikes from the current logged in user, both will show black. If

Delay STATE change in React

I'm writing a website. It's a website that uses and fetches data from a stock API to displays stock prices and charts. I have a search bar which changes state w

Problem with adding image on map with leaflet-distortableimage to the correct coordinates using corners

Maybe someone faced a similar problem. When such a code is executed, the image added to the map is displayed not in the coordinates specified in the corners, bu

setInterval freezes react app after some time (couple days)

I have a react app (nextjs) and show a QR code that refreshes itself every 5 seconds and a clock which updates every 1 second. Further, I have added service-wor

Disabled dropdown option didn't work in semantic UI

This is my Cshtml <div class="field"> @Html.LabelFor(modelItem => modelItem.plateNumber) @Html.DropDownListFor(m => m.plateNumber, new Selec

antlr 4.10.1 for JavaScript doesn't seem to have a buildParseTrees property

I'm using MacOS with antlr installed with brew to generate a parser for Creole in JavaScript. It appears to correctly generate all the files but there is no sig

How can I align my text and put the button on the extrem right of my gray bar?

how can I display my Invitee2 a bit upper in my gray bar ? And for my button how can I put it on the extrem right side of my gray bar ? <div className="bg-gr

Huawei IAP React Native

I am integrating Huawei in app payment module in my react native application, I have followed all the guidelines for setup. Every thing is going smooth but when