Category "javascript"

My React JS frontend application freezes whenever I try to input a new value using Firebase

I am currently following a tutorial to make a simple frontend application that uses Firebase for authentication purposes. My code seemed to work when I only had

How to get localStorage, createContext, withrouter and history, component from react to work on client side while using NextJs?

I am trying to get the localStorage to work but I do not know how to load the code on just the client side. Also to just have certain files run with the informa

Sorting arrays in JavaScript [closed]

I received a big array of object from the backend and I used filtering to leave only these values const markets = ['IT', 'DE', 'UK', 'FR', 'NL

How to execute executeScript before completing onBeforeRequest?

I have a function that intercepts the request and changes the url based on the data from the page function my_func(requestDetails) { var count="0"; chrome.t

Webpack-dev-server "Cannot GET /"

i'm trying to get my webpack-dev-server to run but i face always the error "Cannot Get /" at the browser. I know that there are serveral questions with the same

React-bootstrap Navbar Brand logo not rendering

I am trying to create a logo to use with the navbar on my react app using react bootstrap, and I have used the documentation as a guide. However, when viewing t

NestJS Middleware Not Executed

The NestJS class or functional middleware doesn't run when connected from a Module. It is also not working for a single path, controller or for every path. Conn

ar.js/Aframe multiple objects on location based tracking not working properly

Im using ar.js with aframe to load multiple objects into an a-scene but instead of seeing the objects where they are supposed to be (according to map coord/latl

Regex - Remove special characters but retain negative numbers

I'm building a Number Stepper component in React which needs to support integers (both positive and negative) and decimal numbers. I want to only hold the numer

Extension 'eslint' is configured as formatter but it cannot format 'JavaScript'-files

I am experiencing an intermittent problem with ESLint in VS Code. When saving a file, instead of formatting it, this message shows in the status bar: Apparentl

filter array based on array of multiple condition

I Would like to return the two last object based on the filterArray because filterArray contain 'Orange' as tags and 'Fruit' as type. but because all my obj con

PM2 "Two servers linked with the same server name"

I've a node server.js that is currenty runned with PM2. I put that on docker for use it with kubernetes and every time that I spawn a new machine PM2 monitor wa

GSAP scrolling breaks when switching browser tabs

I've noticed some strange behavior of GSAP scrolling in GatsbyJS. I have a container with full-page sections that are scrolled with GSAP. I open a tab in a brow

Javascript/Excel non-linear X axis/different scale

Is there any way to replicate the graph on the left in Excel? If not, any way to do it in JavaScript/Python? The upper scale on the X axis is different than low

Center React Native Paper Modal

I might be missing something small here but I can't seem to get my <Modal> component to center in my React Native app. Here is the code for the modal: ...

How to resolve persistent node error "EADDRINUSE"?

I'm trying to run an http server through node but I keep getting the EADDRINUSE error with specifically port 5000 (trying various others works fine). I have tri

Why does react/javascript recreates a function instance every time we call it?

For example, onChange function: const MyComponent = () => { const onChange = (e) => { doSomething(e.target.value) } return <input onChange={

How to remove an item from Local Storage when clicking on it? [duplicate]

I want to delete an item stored in Local Storage when it is clicked. But I don't know how to do that. Please help me to solve this problem. Th

Is there a way to override all base defaultProps at once in NativeBase components?

New to NativeBase and using version 3.4.1. We're quickly finding that we prefer the "xl" size for icons and text. Is there an easier way to set all font sizes t

How to get decrypted values in the aggregation result by the using of getter and setter in node.js

var mongoose = require("mongoose"); const Schema = mongoose.Schema; let CryptoJS = require("crypto-js"); function encrypt(text) { try { let ciphertext =