Category "javascript"

I want to display fetched data from api in form columns (auto fill data) in React.js and Mysql

i am using onKeyUp event for fire api without submitting the form and i fetched data in response successfully if Mobile number matched. But i don't understand h

Change color of Pathlayer on Click, MapBox DeckGl React.js

I have a mapbox React.js component implemented with DeckGl I am trying to make my Pathlayer color changes on evenry mouse click (onClick), using onClick, getCol

Uncaught ReferenceError when deploying to Netlify

I have published a git repo (https://github.com/GeorgeFlorian/Forkify-App) to Netlify (https://forkify-jorje.netlify.app/) after following an Udemy tutorial: Ev

Working with promises in a React class component

I have this module to fetch data using the Spotify API: const Spotify = { getAccessToken() { ... }, searchTrack(searchTerm) { const accessToken = Spoti

fetching json api in vueJs log the results but renders nothing (I'm new with Vue)

I'm new in VueJs, actually coming from react, the problem I'm having is that when i fetch the data with an axios.get the console.log shows a succesfull response

How can data from a GET request be displayed in HTML?

When I click on my button, I expect the data from the endpoint to be returned. However, I get this error: Id:undefinedURL:undefinedName:undefinedDescription:und

Task not found: "react-scripts:start"

I've configured tailwind.css to my react project and edit the react scripts according to "scripts": { "build:css": "postcss src/styles/index.css -o src/styl

How to prevent svg on top of other div of triggering mouseleave

I have an issue with mouseleave. (React/Typescript/CSS/HTML project). Situation (see picture at the bottom) I got two div elements <> <div id="main"

Pusher Cannot read properties of undefined (reading 'push')

I want to update the list of users with pusher. When I submit the console shows this error: enter image description here I also get Uncaught refering to pusher.

How to get styling to refresh with new variable in react native

Using a global variable to store dark and light mode variable. In app I have place where variable is changed as user toggles if they want dark or light theme, b

Element added to DOM has HTML / SVG attributes, but not the corresponding JS properties

I am using HTMX with Django to render a page which is basically an SVG with a lot of sticky notes () that you can move around on the page, like you might use fo

How to collapse Siblings with Headless UI

To make the accordion component with Headless UI, I have used Disclosure component. But I have a problem to control the collapse/expand state for it's siblings.

TypeError: Cannot read property 'uuid' of undefined faker-js faker

I am trying to use faker-js package, but I unexpectedly get a TypeError: Cannot read property 'uuid' of undefined for my variable businessId which try to use fa

performing a search on enter?

I have this form: <form> <label for="locationsearch">Location:</label> <input type="search" id="locationsearch" name="locationsearch" /

Eslint to warn when there is a missing import statement?

I'm using nodejs with regular javascript, and using eslint. My eslint is setup to catch many errors in my code - however it isn't catching when I forgot to impo

Testing a React context with jest and consume it in the test file

I'm now trying to test a simple React class context that is used to sets a currency to the global state. However, I didn't know how to to consume the context in

I can't get the code to say reached, anything I try to assign to the array position returns [] instead of the current state (index)

let level = 1 const buttonColors = ['red', 'blue', 'green', 'yellow'] const gamePattern = [] const x = gamePattern.slice(gamePattern.length - 1, gamePattern.

How to set random colour in a discord.js embed

I have a discord bot and it works perfectly. My objective is that when I send the >help message, the bot chooses a random colour for the embed and sends it.

Resetting the form fields and output of the function simultaneously

I am making a picture frame calculator. Therefore, I'm creating a reset button to clear the form fields of the calculator and the output of function calc() sim

How to replace a specific position of a main grid (array of arrays)?

I'm coding a minesweeper and I got the UI and I can't modify it. I've made the grid for different sizes but now I need to push the mines into it, I created a fu