Category "reactjs"

How to change route without re-rendering in Next.js?

I created a filter that when I clicked confirmed button changes url. For example, When I clicked page 1 and place type guesthouse in paris, url looks like this

How to test CSS properties defined inside a class with react testing library

I am trying to test CSS properties that i have defined inside a class in css, wing the react testing library. However I am unable to do so. Adding the simplifie

Is there a way to overcome 401 unauthorized error in React, while trying to access data from Rapidapi.com?

I am facing the problem of unauthorized 401. Done everything mentally possible, so posting it here with code and result pics. The data when accessed like this r

React Router works only after refreshing the page

I am a bit new to react and I am facing a problem with the Router. The routing works when I enter the URL directly on the browser, however when I click on the l

Suprisingly can't find a solution to this. react-csv automatically download to server instead of user choice

so I'm generating an invoice, and am using the react-csv package to covert my graphql data into a csv file. problem is I don't want the user to select a locatio

FontAwesome spinner won't spin in React

I created a React application with npx create-react-app. Then following these instructions https://fontawesome.com/how-to-use/on-the-web/using-with/react I inst

Any possible way for export two ag-grids data to a single excel file?

I have two ag-grids one beneath the other in the same page. Using the ag-grid export option, I can export them separately. But I am looking for any possible way

useswr crashes react component

After adding an SWR data fetch to my react component it crashes, if I comment it out it works fine. I get the following error after uncommenting line const { da

My markers are not displayed React leaflet

the goal is to displayed marker on map. I don't understand why my markers are not displayed I use react-leaflet The response is okay but nothing is displayed th

userEvent in React Testing Library Doesn't Cause onClick To Be Called

I'm trying to run a really simple test with react-testing-library where a button is given a mock function, the button is clicked, and the test checks that the f

stripejs autofill does not work on chrome mobile device (samsung galaxy)

I'm using <CardElement> and "@stripe/react-stripe-js": "^1.4.1", "@stripe/stripe-js": "^1.17.1", Only seeing this issue on chrome mobile browser

React Native - TypeError: n.createContext is not a function. (In 'n.createContext(o.default)', 'n.createContext' is undefined)

I'm trying to implement React Native into an existing Android application. I follow the steps in the official documentation and I have ended with the following

My pages in PBI report is opening on new tab when clicked but I want to restrict this behavior

I have created my application in REACT.js and I have embeded my PBI reports into my application. Whenever I am clicking on the button in my PBI report, I am be

Component Doesn't Show Up & React JS

There is a problem about my compenent, that is it doesn't show up? It's a first I'm doing a website project and using JS and React, so I don't know really what

How to properly write types for an array of generic React components and their properties?

I'm trying to properly type the following scenario: I have a manager/service that contains a collection of items, each item itself consisting of a React compone

TypeError: require(...) is not a function while Using sequalize with node js

I am beginner in web dev and trying to create a Full stack project using Mysql Express React Node js. Facing this TypeError issue while using Sequalize with nod

Chart.js 3.x migration problem – thin white border / padding appears around chart on first load

I'm using Chart.js with a React wrapper (react-chartjs-2). I want to upgrade to the latest major version of Chart.js (3.x) to remove the dependency on moment, a

Difficulty in create regex [duplicate]

40 I'm having trouble checking in React Js if a value is is any of the following combinations no spaces in starting Ramaining accept anything(

React console.log showing duplicate results in Dev Tools

Why does React show duplicate console.log? I found that to remove StrictMode from index.js. but there was no such problem before and why did I remove StrictMode

How to run the ant-design website locally

I'm trying to run the project locally. I'm following the instructions which are straightforward. But when running npm start I get this huge error as seen below.