Category "reactjs"

"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

How to prevent content jumping in framer-motion animation when transitioning between two pages

I have essentially the following setup: <AnimatePresence initial={false}> {value ? ( <motion.div> {/* Page 1 content */} </motion

How to use self-hosted fonts face using NextJS?

Fonts using NextJS I have read different topics about how to use self-hosted fonts with NextJS. What I got [ wait ] compiling ... when I did: @font-face {

React Native Error: 'Permission Denial: starting Intent"

I managed to add facebook login and google login to my application but I think I might have done something wrong. Before I started adding the logins I previousl

Simplest test for react-router's Link with @testing-library/react

I'm trying to understand how to best test that react-router behaves as expected with @testing-library/react. The simplest test I can think of, is to verify tha

how to generate AndroidManifest.xml from a react-native app created with react-native init

I used react-native init to create my react application. I'm trying to tie in auth0 and auth0 documentation is saying I need something from the androidManafest.

How can I get a list of NFTs that I have minted?

I am building Social Media for NFT. I would like to get a list of NFTs minted in the past by a particular user in Ethereum and Polygon Chain. It does not have t

Getting 404-Page Not Found error, when i reload my react application which is on firebase

I have deployed my react application on firebase, when i reload the page it is showing the below page. Firebase.json { "hosting": { "public": "build",

Authenticate my ReactJS SPA with laravel/sanctum using Axios

After a successful authentication (login + token), I'm still unable to request auth:sanctum routes and I get the following response: Docs ... This token shoul