Category "javascript"

TypeError: state.find is not a function

I try to use the find() method but I get cartItems.find is not a function what happens? and how to fix it? import React, {useState} from 'react' function car

Set gas limit on contract method in ethers.js

Problem I am trying so use a method of a contract in the testnetwork (ropsten), but it fails due to this error: reason: 'cannot estimate gas; transaction may f

Does strict mode work differently with React 18?

Consider the snippets below. With React 18, count gets printed twice to the console on every render but with React 17 it gets printed only once. React 18 Exampl

What is the correct type for React Click Event?

I want to use a type for my event handler instead of using type any, Can anyone help me with this,please? here is the code I'm trying to refactor: const MyComp

How should I add an id attribute using Javascript?

I attempted to create a button id when I clicked on using Javascript. Here's something from my code. <div class="DivButton" style="" onclick="divClick()">

chai-assertion to validate anyone is true should pass

I am trying to do assertion to validate any one statement is true, test should pass. Following is the code expect(commuication.status).to.contain( "PROCESSED",

Vertical carousel on scroll react

I want to have a section of the website which is fixed while to slide the carousel on scroll (vertically). Once you are at the last slide the scroll will let yo

Design system monorepo without lerna?

I had a quick question, due to the fact that lerna is not being maintained anymore, I was trying to find an alternative for a simple setup ( React, storybook, J

Draw rectangle over HTML 5 tag video

I tried to use canvas to draw a rectangle 100 x 100 over the center of the image captured by webcam (using "navigator.mediaDevices.getUserMedia") and HTML 5 tag

React Error: You cannot render a <Router> inside another <Router>. You should never have more than one in your app

[index.js] import React from "react"; import ReactDOM from "react-dom"; import "./index.css"; import App from "./App"; import reportWebVitals from './reportWebV

Zapier Javascript Find/Replace Special Characters

I am passing order data from Shopify to VimeoOTT using Zapier. We have been doing this for a year and it works great, except when the customer's name has specia

Prisma, update scalarList/array

I´m doing an Spotify clone and I´m trying to add a song to a playlist but my query doesn't work, until this point, everything was good following the

Argument of type 'Blob' is not assignable to parameter of type 'string | Blob'

Just got an error: Argument of type 'Blob' is not assignable to parameter of type 'string | Blob'. Type 'import("buffer").Blob' is not assignable to type 'Blo

TypeError: undefined is not an object (evaluating 'state.selectedData.push') - Can't add payload to state using Redux Toolkit

I'm having an issue using Redux Toolkit. I want to push an object to my initial state called selectedData which is an array, this gives me the error "TypeError:

Using Link Tree Bio -> zapier webhook (make Java =Zapier child key )->HTTP address connect goal

My name is joe My goal is Using Link Tree Bio https://kenclarkefitness.app/ This address connect This my goal First of all Select from the Zapier webbook catch

Dynamically sortable table with candlestick charts

I'm trying to draw a sortable table in datatables with charts. In python, I get in turn the data for the columns and the data I need to draw the charts- then I

How to properly load JQuery Objects from Node Modules?

I am working on the simple NodeJs App. While working with Frontend, it correctly loads all NodeJS modules related to JQuery, but when I am going to make a simpl

Only send values that have changed in formik onSubmit

I have a small table of data that is pre-filled by an api call on page load. Each row in the table has a facility name and an Enabled value which comes from the

sp- How to get the rigth value for Create / Update List

I have a problem that I can't get the right value in the listItemInfo. I tried following to see the output of the code. alert(listItemInfo.toString());

In reactjs and nextjs constructor getting Reference Error: localstorage is not defined

i make system jsonwebtoken in reactjs and use nextjs. i find problem when i run the code in browser that is localStorage is not defined. this is my code in fil