Category "reactjs"

React Router V6 shows blank page

I am facing a problem. I am trying to use React Router but it keeps showing me a blank page. Here is my code: App.js: import React from "react"; import { Browse

Unexpected use of comma operator React

Line 85:74: Unexpected use of comma operator no-sequences Line 85:153: Unexpected use of comma operator <div className={"card text-white bg-success m

How can I use Mongo DB's database to subtract and add a quantity from an item using the put method from a button? [closed]

what problem my code ? I actually want to reduce and increase the quantity of some items from one button but I can't understand what is wrong

React DatePicker Not showing the selected date in useState

I have a code that should show the calendar so that user can pick the date : Problem is the useState is not picking the selected date. Please help me. Below is

How to check if a key is pressed/held down using event listeners and hooks in React Native?

If I need to know whether a key like the shift key is currently being pressed, how can I find that info? This solution should assign this info into a single var

How to make React-Recharts responsive for all kind of device particularly?

I'm using React Recharts to show some chart data. I am using ComposedResponsiveContainer for my app component and the heights of it is set to "100%" by default.

React JSX Invalid ARIA attribute `ariaLabel`

react jsx: <button ariaLabel='label'>click</button> rendered html: <button arialabel="label">click</button> console warning: index.js:

Plugin React was cnonflicted between package.json

Any project I create using npx create-react-app When compiling the project, the same message always appears: Plugin react'' was conflicted between package.json

I would like to persist add in store without reducer. However, I am not sure how to setup my store accordingly with this

const store = createStore( rootReducers, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__() ); let persistor = persistSt

React Axios Post Requests Being Blocked After Initially Succeeding

I have a React app that has a contact form that submits data to a third party such as Formspark.io, Formspree.io, or FormSubmit.co who basically collect the for

React re-render vs function re-evaluation

Could someone validate if my assumptions after docs and tutorials reading are correct? First of all I would like to introduce some terminology: reevaluation is

window.dispatchEvent from test code does not trigger window.addEventListener

I have below listener added for which I am trying to write test using Jest. However, it seems as though the event I'm dispatching doesn't reach my code. window.

Extracting month,day and year in react with date.toLocaleString not working

I am building a react app and i am trying to extract the month,day and year in react with date.toLocaleString and my website is crashing,showing a blank page, a

React: Uncaught (in promise) Error: Request failed with status code 400

I'm sending a uid a token and two form inputs from formik to my django rest api for a password reset. When i do so i receive a 400 error with a response that i'

React - UI Clicks are not responsive

The problem is after certain changes(for example logout and login), clicks start to be less responsive or not responsive at all. This happens both in local and

React Testing Library Not Parsing JSON

I have a TextArea component that takes JSON {"someKey": "someValue"}. When I inspect the dom, {"someKey": "someValue"} shows up just fine in the inspector. Howe

Script from localhost:5555 was blocked because of a disallowed MIME type (“image/png”) in vitejs

I am dynamic importing 9 images but the site crash with these err messages Uncaught (in promise) TypeError: error loading dynamically imported Script from &ldq

How to configure http-proxy-middleware without using Create-React-App

I have a cumtom react startkit package, and I need to dynamically configure the domain for front-end API calls. I plan to use the http-proxy-middleware plugin,

React Native / Expo / NativeBase - fontFamily "Roboto_medium" is not a system font and has not been loaded through Font.loadAsync

I am creating a mobile app using Expo and would like to use NativeBase for UI components. No matter what I try to do I get this annoying error: fontFamily "Robo

How to print the checkbox in a row instead of column?

<div> <div> <IndeterminateCheckbox {...getToggleHideAllColumnsProps()} /> Toggle All </div> {allColumns.map((c