Category "javascript"

How do i replace eval

I have some existing code that looks like this. i = new Function("obj", "_", s); The parameter s contains an executable javascript code, as a string. At a late

React.Lazy not working when consuming Micro frontend with webpack 5 and plugin Module Federation

What is happening is that I am consuming a Micro front-end through module federation, but even using React.Lazy the bundle (remoteEntry) is loaded at the start

What is the best practice to quickly access big amount of data in the web browser?

I have this huge array of strings, saved in a JSON file on a remote server (the file size is 2MB and increasing).. In my front-end code, I need to constantly lo

pointerdown vs onclick: what is the difference?

What is the difference between the onpointerdown and onclick event handlers? Are there any practical differences? Are the events not propagated the same up the

How to apply HTML Table in React Native?

What I want is setting all the cells width in a column as widest cell in the column. For example I have a column and there are cells in that column. Cells have

discord.js disable “interaction failed”

If an interaction (for example button click) is not replied, discord will display “interaction failed” in the client What they expect you to do: int

Material UI unable to control the DatePicker error

I have a problem with the DatePicker, if there is an empty value it's red. And passing true/false to error doesn't have any effect. I even tried passing error

Cypress won't show an array contents into the console

I'm trying to add the titles of an iframe header into an array to then print the array with it's element into the console. The elements are added just fine, the

socket.io POST error and CORS policy error when sending messages too fast

In my frontend app I implemented mechanism which splits file into chunks and then sends their parts in a for loop like this (chunks is an array of strings - con

I can’t get Contentful connected to my site

So, I've only ever used WordPress, but I decided to build my site from scratch so I'm free to do whatever I want with my site. I'm a new developer and I just he

How to solve missing CORS headers when user defined headers provided?

Having troubles with providing Authorization header for requests: const response = await fetch(url, { method: 'GET', }); This works properly, and r

Grabbing a message mention taking longer than expected (DJS V13)

I'm using message.mentions.members.first() but the problem is that when I ping a user, the bot replies after a long delay. Video: https://gyazo.com/a8739e60bb86

Linking multiple hrefs to accordion and opening the corresponding section - Jquery

I have multiple hrefs that need to link to the proper accordion at the bottom of the page. The code I have now works, however I'm trying to minimize the amount

An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft

I understand this has been asked before but so far no answers except someone making a syntax mistake. I have verified this against every tutorial I've seen onli

Echarts: When [large: true] is enabled, the tooltip box will disappear when appenddata is dynamically updated

env echarts version : 5.3.2 os: win11 issue When using appenddata to update data, and the data volume exceeds the largethreshold, the tooltip will disappear whe

ReactJS : Failed to load plugin 'testing-library' declared in 'package.json : Cannot find module './eslint-utils'

I recently made some copy pasting of code base from my one device to other device. I copied everything including the node modules folder. Now when I am running

React update outdated dependencies flagged by checkmarx

In my project, I have some outdated dependencies that have been flagged by Checkmarx. However, the dependencies flagged are in react-scripts version 4.0.3. For

Matched leaf route at location "/" does not have an element

Matched leaf route at location "/" does not have an element. This means it will render an with a null value by default resulting in an "empty" page //App.js Fi

What is the lifetime of the variables declared inside component file in React?

Consider the React code declared inside LoremComponent.tsx below: const foo = "bar"; export default (props) => { return ( <h1>{foo}</h1>

React hooks: Why do several useState setters in an async function cause several rerenders?

This following onClick callback function will cause 1 re-render: const handleClickSync = () => { // Order of setters doesn't matter - React lumps all state