Category "reactjs"

Label must have associated control

There is a div with some elements in it and I want to add a label to it. This is the original: <div className="upload-image"> <i

React component run error.Uncaught Error: Minified React error #31

I am trying to return some html label when write render in my component. Code like this: import React, {Component} from 'react'; import Request from 'react-h

How to add PAYTM gateway integration in react js web application?

I got it working from here https://github.com/paytm/paytm-pg-node-sdk-sample/blob/master/javascript/DemoApp.js I used this in express and it is working but now

React and TypeScript—which types for an Axios response?

I am trying to present a simple user list from an API which returns this: [{"UserID":2,"FirstName":"User2"},{"UserID":1,"FirstName":"User1"}] I do not understa

Mobile Safari Not Showing My Video Texture

I have a question similar to this one, but in my case, it's iOS causing troubles (not macOS, which I haven't tried yet), so I hope it's OK to post this as well.

Cors issue i also set the proxy in pkg.json due to cors and set the api according to it but this error is not remove

GET http://localhost:3000/api/fetch?search=12312321 404 (Not Found) cors issue in Reactjs and node js i use the proxy method in Reactjs but can't get rid

Return back array from another component React

So I currently have a Parent component, and a child component. The parent component consists of the following: import React, { Component } from 'react' impor

Return back array from another component React

So I currently have a Parent component, and a child component. The parent component consists of the following: import React, { Component } from 'react' impor

"npm run build" = "react-scripts: Permission denied"

I'm trying to deploy my working Windows 10 Spring-Boot/React app on Ubuntu 18.04 but keep getting "react-scripts: Permission denied" error despite numerous atte

React: Expected an assignment or function call and instead saw an expression

I am trying to fix this lint error at line const def = (props) => { in following sample code. const propTypes = { prop1: PropTypes.string, prop2: PropTypes.

unable to install apollo/react-hooks , requires peer of graphql

While installing npm install @apollo/react-hooks, I got the following error message. It tells me about installing graphql with a version higher than 14.3.1, but

Hide Menu Icon Button of Appbar of Material UI for only Desktop

<AppBar title="My AppBar" showMenuIconButton={false} /> This Hides the Menu Icon in all devices. I need to hide only in Desktop. How Can I achieve th

How to Check if Axios Call Fails due to No Internet Connection?

I'm trying to figure out an accurate way to detect axios call failure due to no internet connection. Does axios call failure return a specific response object

React Parallax wont load Image

I'm trying to replicate this Parallax effect Here and it doesn't seem to load my image. I am using the React Scroll Parallax Here but I can't figure out why my

TypeError: Cannot read properties of undefined (reading 'click'). fireEvent.click works but userEvent.click does not. Why?

Just started learning React testing with Jest, and am struggling with something simple. When I call userEvent.click(btn), the test fails saying that userEvent.c

React, useRef not allowing to access current properties, getting Uncaught TypeError: Cannot read properties of undefined (reading 'clientHeight')

I'm storing a reference to an image item using: const renderedImageRef = useRef(). The ref is then assigned in render() function using: <img ref={renderedIma

How to implement Twak.to widget in a Next JS website?

I have tried what is written on their @tawk.to/tawk-messenger-react plugin docs? I have made a component like /components/Chat.js import TawkMessengerReact from

react input cursor moves to the end after update

When I update the value in my input field, the cursor moves to the end of the field, but I want it to stay where it is. What could be causing this issue? <I

Using Typescript generics for React Functional Components with eslint props validation

I want to create a functional component in React using Typescript, and I have already set it up according to this Q&A: export interface CustomProps<T ex

React useForm equivalent in class component

I moved a functional component to class component recently and don't find the equivalent of useForm when using a class. Here is the code I used before: var com