Category "javascript"

app.css error when compiled with ruby sass from app.scss

I'm trying to build my project with gulp, and the app.scss file is compiled with ruby sass. The problem is the app.css gets error and cannot be applied to brows

Can I export multiple named exports in a named set without affecting call to variable?

I have constants file with: export const VAR1 = 'VAR1'; export const VAR2 = 'VAR2'; export const VAR3 = 'VAR3'; export const VAR4 = 'VAR4'; export const VAR5 =

How do I add delay within a function in Javascript

I am trying to create a simple function when on click a series of style changes happen to an element. I want to add a 4-second delay in between the two style ch

Warning: Failed prop type: The prop `history` is marked as required in `Router`, but its value is `undefined`

So I'm a beginner in react, and I'm racking my brain to try to solve the error and still I'm not getting it... I've already messed with this code below, to try

Phaser 3: Clone Sprite on click & drag immediately

I have a sprite that works as a button, but as you press it, it duplicates and lets you drag the duplicate. I've almost got it to work, however currently you ha

Sencha ExtJS skipping rows with Checkboxmodel's select all box

I am trying to make a checkbox grid that some of the values are read only (it is a list of features and some features are required but I want the user to be abl

need for json loader in webpack 5

I want to import .geojson file extension just like .json files (I don't need any special parsing). as I seen in webpack docs: Since webpack >= v2.0.0, impor

Lottie Player got deleted immediately after page load

Folks my Lottie player HTML element is got deleted every time the page loads. The website is on WordPress and the Lottie player code is infused through a custom

React-Webcam Recording, Replay, Re-recording, Storing

Just making a video recording component that you can replay afterwards to see if you like it, if not you just re-record, and finally it will store it in the dat

React navigation via props.history.back

In my React app, I have different routes. Now, if I bookmark one of the URLs (which has a Back btn) and if user goes back (either browser or via the Back btn),

Typescript: Type 'Promise<void>' is not assignable to type 'void | Destructor'

The editor is showing Type 'Promise' is not assignable to type 'void | Destructor'. for the checkUserLoggedIn() call in useEffect. I can get rid of it by doin

Populate dropdown2 from onChange event of dropdown1

I need to write a code where i need to populate a dropdown1 from mysql table based on the selection of another dropdown which also where in need to give values

JSON parse a property of an object inside an object?

I'm trying to JSON.parse(nodeInfluxSeries) a property that is in an object, that is also in an object and in an array. Like so: Array [ Object { "id": 1,

TypeScript Disallow Unecessary optional chain expression

Is there an es lint rule or typescript config to disallow the following ? let s: string; s = 'a'; s?.toLocaleLowerCase(); In my opinion, s is not nullable so n

How to add style in Vue js 3 on a cdn based app

I'm learning Vue js. I created a Vue JS app with cdn link and I want to know, how to add element style to it. I can write template as template: <div>Vue j

populate convas.js multi series spline chart with data from database?

I have a dataset, for which I have to build a multi series spline chart. Here I have used canvas.js. But I cannot populate this graph with data from database. I

Bundle JS and CSS into single file with Vite

I'm having a devil of a time figuring out how to build a single .js file from Vite in my Svelte project that includes all of the built javascript and CSS from m

Why prettier put a comma ',' at the last element of the object

In Visual studio code, When I am using chart.js in my app, prettier always put a comma at the end of the last data of the object 'label'. I think, it's create a

sending selected field to another react component

I am receiving my API data in react. I am sending same data to another component to download the excel file. const [data,setData] = useState([]); const fetc

Adding video captions tracks dynamically puts them in the wrong order

When I try and add video text tracks to videoJs player, it adds them in the wrong order where the new track appears above the previous track. I have created a j