Category "reactjs"

How to access one function from one react component to another

Hi I want that when someone click on backproject I want to set my modal component display to block currently its set to none but when I add that function in App

How to Format code in vs studio with eslint

Initially I used to use prettier to format my React js code. Now I have ESLint integrated with CI that's why my code is throwing minor error of indentation,semi

MUI Datagrid - TypeError: Cannot read properties of undefined (reading 'name')

Im using Material UI's datagrid to show some data in a table, I recently switched over to RTK query from redux for caching and to get rid of the global state ma

Link tag in React is not working with devserver-proxy

I'm following this tutorial to make my React app (localhost:3000) communicate with Node server (localhost:5000) .. so instead of typing <Link to='localhost:5

Modify values of selected option ANTD

I want to choose "% Percent" as option, but the value on the select label want to be only "%", if I set value attribute, it doesn't change when select other opt

On-the-fly thumbnails in React

I am developing a website with React which has what we called "snippets", basically a modal window displaying some kind of media (audios, videos, slides, text q

What is the valid name of the contact?

I'm trying to give a name to my smart contract. But All given names is invalid. Where is the mistake? Because I guess all names are alpha-numeric. Can you help

is usContext a reliable solution to drill state 2-3 level deep

I have a search component which needs to pass the state in which the visibility of my search modal is stored down 2-3 levels. I know that context is provided to

MUI Datatables Column Header Not Tidy

I was using MUI-Datatables in 2020, and I really satisfied with it so I want to use it again with my upcoming project. Lately, Material UI was upgrading and I t

React Spring UseTransition list not removing in order

I have been trying to animate a list of items in React JS using React Spring that changes with new data, but ran into an issue. The problem is, that after chang

How to fix loading spinner when using useEffect Hooks with dependency list?

I am facing one problem when trying to add a spinner. My problem is when I add "product" dependency in useEffect hooks then my loading spinner always spinning a

Module not found: Error: Can't resolve the typescript file when adding typescript to a CRA app

I'm trying to add typescript to my project and write new components with typescript. I followed the documentation but I'm got this error:can't resolve [the type

Web3: Cannot read properties of null after new ethers.Contract

I am trying to use a smart contract just after I instantiate it. However, I get an error: Uncaught (in promise) TypeError: Cannot read properties of null (read

How do I get useEffect to run on array sort? [duplicate]

I have an object like this const example = [{medicineName : "Some name" medicineId : 1} {medicineName : "Some other name" medicine

How to resolve the error: Module '"react-hook-form"' has no exported member 'useForm'

I want to make simple login page using react-hook-form I get this error: Module '"react-hook-form"' has no exported member 'useForm' import React from 'react'

Problems with installing SASS React

I want to install SASS to my react app. I try yarn add node-sass my console return error: ./src/comopnents/Form/Form.scss (./node_modules/css-loader??ref--6-one

react testing library: can't acquire context from the given item

I have this component, which uses react-chartjs-2 to render a Doughnut chart: const CompliancyChart = ({data}): JSX.Element => { ... return ( <Cha

npm error ENOTEMPTY on babel-loader while npm install

I am trying to install a new dependency and I get this error. Any hint to fix this please ? Thanks! ==> EDIT : I tried to delete that folder and run the npm

blank/white page error in react js app ( stopped working in chrome and edge all of a sudden)

I have a react app which is in production for few years now, everything was working just fine but all of a sudden a it has stopped working (only a particular fu

iframe element not rendering in IOS devices

works fine in all windows but not in iOS devices. Video show ok on windows but in ios not render the video. render() { return ( <> <iframe s