Category "reactjs"

how to implement page navigation in react testing library (Link, a tag, history.push)

I am trying perform Dom testing at '/test' url page. my application use BrowseRouter from react-router-dom As following user approach, I want to manually chang

Invalid hooks call. Hooks can only be called inside of the body of a function component

Please have a look at the validate method inside the elfe-if condition in the below code. I am unable to call the useLocation method of react-router-dom. I have

Recharts: how is it possible to show only the value of ONE data point inside a Tooltip?

I am trying to implement the following example inside a Recharts LineChart: the Tooltip value is relative to the blue point, because my mouse happens to be near

useState and if statement causing Error: Too many re-renders. React limits the number of renders to prevent an infinite loop

What I'm attempting to create is a React component which conditionally renders when the value of the prop boxToggle is true, and also returns null when the user

Stripe parameter_invalid_integer

I am trying to setup PaymentIntents API from Stripe and the amount needed to be passed to the API is very confusing. Stripe Docs: All API requests expect amount

_reactDom2.default.render is not a function

consider the following react code the main.js file is: import React from 'react'; import ReactDOM from 'react-dom'; import Maincontainner from './maincontainn

tslint says calls to console.log are not allowed - How do I allow this?

I just started using create-react-app with typescript create-react-app my-app --scripts-version=react-scripts-ts and the default tslint.json configuration d

React scheduler's `unstable_runWithPriority` doesn't use `priority` in any way

I ran a profiler on the following code: function App() { const [ counter, setCounter ] = useState(0); return <div> <div>{counter}</div>

What is sunproxyadmin service?

I was trying to run a front end project locally after pulling it down from git. After which I got the following error: vents.js:183 throw er; // Unhandled 'e

How do I disable future dates in reactjs?

I have not use any datepicker still code is working fine. I have selected input type to date and everything's working fine. Now I want to disable future dates.

Do I need to clone props before using/mutating it in React?

Imagine a component has props and the props have nested objects and arrays. In the child component, if I need to copy to props.nestedObject or props.myArrays to

How to get x-amzn-oidc-data in Expres/NodeJs backend with ALB and Cognito?

I have setup and application which uses a React front-end and Expres/NodeJS back-end. There is an ALB in the mix as well. So, here is how the flow goes: The ALB

Authentication between different applications through sessions (React + Express)?

I'm developing a React + Express website and I'm in doubt on how to implement the login functionality since it depends on another application. Let me explain it

AntD custom color for active tab without css/less,

I am trying to change the background color for the active tab from AntD tabs, I can achieve that with less file by targeting: .ant-tabs-tab.ant-tabs-tab-active

Passport.js isAuthenticated() always returns false when on heroku, but works properly when server is run locally

I am using passport.js for authentication as well as express-sessions to store cookies on the client. Additionally, my client is a react app. I still am not sur

react route component is not rendering anything

I created my app with create-react-app and tried to use react-router on it. but it's not working at all. I am using react-router-dom 5.3.0 version. But if I typ

Re render ReactMarkdown

Steps to reproduce: Using props children and update state component in which ReactMarkdown is placed. Expected behavior: I expected that when processing the sam

Main differences between lit-element & React [closed]

Looking into React code it seems more similar to "Lit-Element" code, Both can be used to create web components. It is very helpful if someone

Moving react app created with create react app to another computer

I used Create React App to create a React application on one computer. No problem. But how do I move the code to another computer (i.e. the entire folder stru

Delete item from mongoDB from client side

I've created a React app where you can post vinyls you have in your collection. Now I've implemented a button that is able to remove the selected item from the