Category "reactjs"

React onClick a links not working how do I make them work?

Im trying to create links in my homepage to my other pages that do not use Router. My links work in the app but when Ive transferred them to the homepage and th

GSAP scrolling breaks when switching browser tabs

I've noticed some strange behavior of GSAP scrolling in GatsbyJS. I have a container with full-page sections that are scrolled with GSAP. I open a tab in a brow

Does React Table Support Icons in Cells, and Collapsible Rows

Can React-Table support (Please refer to the image below) icon in table - in green rectangle ; collapse row when necessary - in red rectangle? If yes, may I kn

ReactJS - Serving the Same Build from Different Paths

I try to run the same react app on different URLs but for now without success. Description of the problem: I have a react app that works perfectly fine when run

Why does react/javascript recreates a function instance every time we call it?

For example, onChange function: const MyComponent = () => { const onChange = (e) => { doSomething(e.target.value) } return <input onChange={

How to remove an item from Local Storage when clicking on it? [duplicate]

I want to delete an item stored in Local Storage when it is clicked. But I don't know how to do that. Please help me to solve this problem. Th

State in useEffect undefined after the useEffect sets the state?

I have a React Native app in which I am running some code that looks like the code below. Why is the following output undefined? Reading someState from useEffec

Make id in FormattedMessage from react-intl inherit from a custom TypeScript interface to enable VS IntelliSense and type checking

Given that react-localization does not have date and number format and is heavily dependent on one developer we decided to switch to react-intl because it seems

Unable to fix popper placement in autocomplete

I am using the <Autocomplete /> component of Material-UI and I have a situation where I want my drop-down to always appear at the bottom. Therefore I did

How can I fix : Request header field x-access-token is not allowed by Access-Control-Allow-Headers in preflight response?

I am trying to upload an image to Cloudinary from my local address (localhost:3000). However, when I try upload an image to it, it is giving me this error: Acce

Error 401 on API Platform for some requests

I try to request some information from API Platform with React. This is my code to get all the Technics. It works perfectly fine, I got a status code 200. But w

502 Bad gateway after deploying react app on GCP

I recently upgraded my application from CRA-ts to CRA, upgraded react version from 16 to 17 with typescript version of 4.1 and node version to 16. On backend I

mount is not working in enzyam in react js

//write the test case got this error when i am using shallow its working fine but not gent expect value do you have any solutin please help to me import React f

Vercel 500 internal error! Cannot get logged in

[GET] /auth/signin?callbackUrl=http://localhost:3000 17:22:23:77 2021-10-24T12:22:24.062Z a07d6ace-3b47-4472-a45b-f7ef9989a9b5 ERROR [next-auth][err

how to reveal/unrveal password inside input in Data Driven Forms (it npm react package)?

I have a custom form imported from node_module as import FormRenderer from "@data-driven-forms/react-form-renderer/form-renderer"; this form requires schema in

Can't format Quran page in react native

I am making an app to read Quran, using react native (expo). I am having some problems formatting the text. Problems: Random spacing Text resize automatically T

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in the package.json of a module in node_modules

This is a React web app. When I run npm start This error occurred > [email protected] start > react-scripts start node:internal/modules/cjs/loader:488

Can i put a value inside a ReactJS Component and then get that value somewhere in another file with importing?

so i am making a ReactJS Component for a contact form. And right now I want to make a method that gets the value from an input in the JSX, and then i want to ge

How to fix 'The previous state received by the reducer...'?

I load/update data in localStorage: import thunk from "redux-thunk"; import {applyMiddleware, createStore} from "redux"; import {composeWithDevTools} from "redu

Can't resolve 'otp-input-react' in my D:\project\app\src

I am trying what I am doing is wrong but didn't find any.Tried to uninstall and reinstall the package then also it is not working here are the images for more c