Category "reactjs"

Mui Autocomplete combined with a popper component is causing a major leak when deployed to Heroku?

I have the following code for a v4 mui autocomplete component, the issue with it, is that the custom popper component is casing a R14, H10 errors when deploying

Next.js - router.push without scrolling to the top

I am using router from next by importing useRouter from next/router. I am trying to find a solution which will not scroll to the top of the page when I change t

_enzymeAdapterReact.default is not a constructor when test jest

I'm having this issue when test react-native component with jest and enzyme TypeError: _enzymeAdapterReact.default is not a constructor Here is my dev dependen

How to connect Metamask based on the input wallet adress

When I type a wallet address and press the Save button I want to show a Metamask sign in popup to that wallet. for now, It's just randomly connects with the sel

ID is gone when I refresh a NextJS Dynamic Route page

I am trying to get dynamic routing working in order to display and retrieve the right information using the id from the url. This works when I visit the page, b

Next.js: How to get static assets from within getStaticProps

I am using Netlify CMS. I want to import all the slides for a carousel into my component. I made a collection called slider and added a few slides. That created

Don't include polyfill to React JS with Slack Bolt

I have a really simple ReactJS code that use the Slack Bolt package. When I run npm run start I have three errors : Module not found: Error: Can't resolve 'os'

Why are the args for my storybook component showing as optional instead of required?

I have a simple loader component import React from "react"; import { Backdrop, CircularProgress } from "@material-ui/core"; import { makeStyles } from "@mat

CORS Problem with React js on my PHP from the scratch API

Hello Guys I have a problem on my PHP API i uploaded my API on this website "app.infinityfree.net" whenever I try to access my build in PHP API I get this error

MY React Web Page Does not work in an iframe

I've build a web app on react and used react hooks for my forms. However it is not working when the web application is embedded within another application. The

React Context API - dispatch is not a function

Implementing a Log in system with React Context API. When submitted the form with user credentials, getting an error. Error: Unhandled Rejection (TypeError): di

react-native-track-player crashing due to exo player version conflict in track-player and react-native-video

So I am using react-native-video and react-native-track-player parallelly, Normally both are working fine, but to use some extra functionalities of video playe

avoid scrolling when interacting with canvas on mobile

I'm trying to allow drawing using touch on the HTML canvas, but it scrolls the window when I try to draw. I've tried using preventDefault() on the event functio

Can not get Facebook email for React Login/Register

I can not get the Fb profile email for React Login/Reg and can not find how to solve it. I need to get data and post my other Api. Name, picture and id comes, b

how to spy on window.location functions?

i need to cover my code with some unit tests and in one of then i have the following situation. app.tsx async someMethod( . . . windo

Module parse failed: The keyword 'interface' is reserved (5:0) File was processed with these loaders

It is my first time publishing package to NPM. I have published simple React + TypeScript component to NPM, but when I installed and tested it, I am getting the

Using react-router with recoil

I have 'react-router-dom' and 'recoil' in same application. What is a proper way to update recoil state within route? const ItemRouter = ()=> { const [s

How to add the items from a array of JSON objects to an array in Reducer?

So I am fetching the list of 10 todos from https://jsonplaceholder.typicode.com/todos?_limit=10&page=1 I am updating data with the array of these 10 todos.

How to load script in react component

I am having following script file <script language="javascript"> document.write('<script language="javascript" src="http://tickettransaction.com/?bid

How to set a filename for downloading csv file with react-table?

I am using react-table v7, useExportData and papaparse to download a .csv from a table referencing to this codesandbox, so far it downloaded successfully but I