Category "reactjs"

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

Split Routes inside a single Switch into multiple components

I'm using React Router v5 and I ran into problems when trying to define routes split across multiple components. The case I tried is something like the followin

React jsx attribute avoid duplicate attribute name

I am using Nextjs I dont really know to describe my question but here is an example. In my code, I got few const pathname = router.pathname <NavItem pathname

How to open an S3 pre-signed URL in another tab?

How do I open an S3 file in another tab and not download it? I have this feature that generates a pre-signed URL. The front-end then opens this URL. However, wh

Change getusermedia stream resolution after it is already created

I have a React app that records the user's webcam I'm implementing a feature to allow the user to change the video resolution. When I create the Media Stream fo

How to upload images file in firebase in reactjs in newest update

I'm having a trouble of how I will upload the images in firebase. So basically I separated the firebase.js file and the imageupload.js file It is something like

Input field caret position problem in react

Hey, everybody. I'm new in web dev. I have a task on react to increase days in first part of string in input field by clicking 'ArrowUp' button. In addition mut

Material ui: How to change DatePicker text and calendar icon color?

I am trying to change the Material UI DatePicker date text and calendar icon color. I tried to change it passing style to InputProps, but it worked only for rem

Moving Slide Buttons in Bootstrap Carousel not Working

I'm trying to vertically center the buttons for my bootstrap carousel using react. using inline styling I was able to change the height of the button itself, bu

Uncaught Error: Cannot find module 'file:/home/agemiro/backend-gerenciador/uploads/imagemteste.png'

I'm using React JS and I'm having trouble accessing an image that comes from a state/variable. If I put the url inside the require in the html img it works but

React application built on top of firebase renders 404 on page refresh

We have a React App built on top of firebase. The problem we are facing is if you change the url by navigating to a different page other than the root '/', then

Search bar won't stay at top with CSS position: sticky property

I am trying to make a search bar stay at the top of a div with position: sticky but the property doesnt seem to work. Googling it, I see that overflow: hidden a

Always get undefined when using Yup.array().when() with two arrays

I have two arrays and I want at least one of them to be filled before submitting My config: initialValues={{ images: [], current_images: [], }} validati

GraphQL Subscriptions not working on Firefox - Error 400 bad Request

I have a Frontend app that is built in React and it is connected to a GraphQL backend using Apollo Client. Queries and Mutations are working fine in all browser

Uncaught Error: Map container is already initialized

I am using React JS for making a webpage. My aim is to display a map on the front end. I am using the react-leaflet npm package for the same. However, I am gett

meteor.js - upsert does not throw a console error, but doesn't insert data

I'm trying to update or insert data with upsert, but it doesn't work. Neither update nor insert doesn't work... but I don't see any errors both in terminal and

React/TypeScript app fails to deploy to subdomain (404)

Hi I made react typescript app. Everything works perfect on localhost and domain, but when I upload same build folder to the subdomain i have 404 error. My .hta