Category "javascript"

How to save unique id as a name of a image in Firebase?

Hey guys I have a problem relating to firebase, so the problem is whenever i upload the same photo twice i got an error that the previous photos go unfetched(th

Commitizen and husky seem to be triggering the pre-commit hook twice

I am trying to configure commitizen with husky and when I commit using a custom script from package.json commit gets triggered twice. This is not the case when

React bootstrap navbar collapse not working

I have used react bootstrap navbar also used react-scroll for smooth navigation. It's working fine but navbar is not collapsing when clicking any nav item in th

ReactJS - How to print all the content of a Scrollable elment with react-to-print

I have a <div> tag that has a list of elements, the list can be long so I gave a fixed height to the <div> tag and overflow:auto property to have a

can't get response status code with JavaScript fetch [duplicate]

I'm trying to create a login form. when I'm testing the service with Postman, I will get a body object with status code and etc. But, with

React bootstrap navbar collapse not working

I have used react bootstrap navbar also used react-scroll for smooth navigation. It's working fine but navbar is not collapsing when clicking any nav item in th

ANSI escape codes not moving cursor horizontally

I am trying to make a text editor in the terminal with node and typescript but the ansi escape codes aren't moving the cursor horizontally. THe cursor moves ver

ReactJS - How to print all the content of a Scrollable elment with react-to-print

I have a <div> tag that has a list of elements, the list can be long so I gave a fixed height to the <div> tag and overflow:auto property to have a

React router order of routes, does it matter?

I set up my react router like this: <Route exact path="/users"> <component/> </Route> <Route exact path="/users/:id"> <compon

Display GET Request data in HTML

This endpoint http://vk-data:8003/v1/entries/ returns this: [ { "id": "country", "url": "http://vk-data:8003/v1/entries/country", "n

firebase package was successfully found. this package itself specifies a `main` module field that could not be resolved. none of these files exist

node_modules\firebase\package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved node_modules

Word Break algorithm

I'm trying to implement the "Word Break" algorithm. Problem: Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determin

Using i18n.detectLanguage() in Vue

I was reading Moxilla documentation and found the function i18n.detectLanguage(). The document states that it can be used in the following way: var detectingLan

CSS showing differently for Deployed then localhost when moved from material-ui version 4 to mui version 5

Image for Development Environment: Image for localhost: As is visible jss6 css is what is coming from makeStyles-sidebar 6 but on deployed version there is so

How to access the value of a promise?

I'm looking at this example from Angular's docs for $q but I think this probably applies to promises in general. The example below is copied verbatim from their

(Yup) how to create multiple errors using a single .test() function

EDIT: while the accepted solution worked, this worked much better in my use case I have one function that validates that neither input field A nor input field B

Vue Table with draggable rows won't get exported reordered

High I'm new at programming in Vue, but I want to use Vue Leaflet. So I made thiggs simplified version of my program which highlights a major programming proble

Css not updating react component

/* Here is my container in my react component */ <Container fluid className="graph-container"> <Tabs id="graph-buttons" var

I need to subtract the count and update the remaining count

I am using TextField that field data I am adding into the table that works fine what my task is I have one field called Total no of count their I am storing my

Implement v3 Recaptcha without recaptcha/api.js causing 'Reduce unused JavaScript' or ' Reduce the impact of third-party code'opportunities

I am able to get recaptcha to load on a website, with the async and defer tag on it. However, when I check Pagespeed Insights against it, I see two issues: Redu