Category "reactjs"

React: How to get current Route path on each route change? React-router v5

The following code is giving base route instead of nested routes or I can say the current route function test() { const route = useRouteMatch(); useEffect((

React: How to get current Route path on each route change? React-router v5

The following code is giving base route instead of nested routes or I can say the current route function test() { const route = useRouteMatch(); useEffect((

Can't deploy React app in Production mode to Azure app service via VS Code

I have react app, which runs on Azure. I am using Visual Studio Code with App Service extension for its deployment to production and it works well. Unfortunatel

Can't deploy React app in Production mode to Azure app service via VS Code

I have react app, which runs on Azure. I am using Visual Studio Code with App Service extension for its deployment to production and it works well. Unfortunatel

React Require auth problem as like secure page problem single page offline login works but not redirect work

When I set up require auth state its works but when it redirects the page it doesn't work. Pages show empty. When I reload then it shows again. import React fro

Get remaining days, hours, minutes, seconds to date with date-fns

I want to get remaining full countdown of next instance of weekday (for example next Thursday), I have two functions: FIRST: gets instance of next Thursday SECO

Run setTimeout with changing time values

I have an array of objects containing a field duration that specifies the duration that the Object should stay visible. Each Object of array has it's own durati

This React Private Route isn't catching Firebase Auth in time?

I'm working with React to build a admin panel for a website, and using Firebase as the authentication system (and data storage, etc). I've gone through a few Pr

I've been trying to build a game in react native and I have to render some svga files. How can I use svga in react native?

I have tried these npm packages "react-native-svga-player-ex","react-native-svga-player","react-native-svga" but these are outdated and not supported in react v

How to get checked State in functional child component

I'm struggling with a simple problem in ReactJS. I'll have two functional components one parent component (list with elements of child) and one child component

Render between start and stop button in React Native

I wanna render between displaying a start and stop button based on pressing the buttons. That means if the start button gets pressed the stop button should be s

Post Review on product through Amazon SP-API

Scenario: I'm build a NodeJs (NestJs Framework) application, Where I can get feedback from my clients (Amazon Product Purchaser) and Post its review on my Amazo

error TS2339: Property 'clipboard' does not exist on type 'Navigator'

I get this error in my project, that I am updating - they want to copy data to the clipboard. Custom data, that I can easily put together error TS2339: Property

React-Tooltip not displaying until page is refreshed

Bit of a weird one here. My website is virtually done, there is just one issue. I've implemented tooltips, but they only display once I refresh the page! Here i

Variable not displaying on Screen

I've set condition for when a user enters numbers into a text box depending on what the numbers entered start with on screen it should display the name of the c

How to write custom select/checkmark logic for material-table, to include selected rows inside of detail panel nested material-table

I have a material-table component where I am rendering a nested materiel-table in the detail panel of each row. I would like to know if there is a way to includ

How to make an arrow function in react so that it executes only once and saves the data in sessionStorage

I am developing an application in react.js and I need to implement a request to Active directory to extract the information of the logged in user, through Micro

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined... issue

import firebase from 'firebase/compat/app'; import "firebase/compat/storage"; import 'firebase/compat/auth'; import 'firebase/compat/firestore'; const firebase

The current testing environment is not configured to support act(...) - @testing-library/react

I'm trying to upgrade my project to React 18, everything works in dev and production mode in the browser. But after upgrading to the latest version of @testing-

React webpage refreshing every 4-6 seconds

I'm not really sure even what part of my code to show because it's such a general error, but everytime I npm start my React webpage it automatically goes from t