Category "reactjs"

Webpack5 + react-refresh-webpack-plugin does not work

I wanted to setup react with webpack, babel, and typescript myself since I would like to know more and have a consistent boilerplate for development. I have bee

@mantine dropzone React image upload issues while image upload on login form

I tried for getting the image path with Dropzone in this way {...form.getInputProps("tourImages")} but it gives undefined . Also, I tried getting an image inpu

on unmounting of component not getting the state value

I have a state variable where i am having the value, so on before unmounting i need to log this to some analytics. So when i access the state it shows me as und

tiptap font size react

I'm using tiptap as an editor in my react application, the problem is that I haven't found how to modify the font size inside my editor, I have searched for an

React JS odd Error on 'npm start' Failed to parse source map

My Error: WARNING in ./node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed

Cannot find module '@material-ui/lab'

I am building a front-end page where I need @material-ui/lab. After installing the package with npm, I get a typescript error when compiling: TS2307: Cannot fin

I can't seem to pass an array of objects as prop (console logs 1 object, [object object] instead)

I am new to React js and I am trying to pass my data(dummy_data) as props from App.js to PieChart.js so that I can access the data from PieChart.js. dummy_data

How to enable VS code intellisense for absolute path imports in a React app?

So, i recently created a React app and added the absolute imports by updating the jsconfig.json for my project as per the documentation (https://create-react-ap

SessionStorage is Null

First of all I'm saving a user in SessionStorage in React. The problem is that I'm trying to make a filter that validates some data in the user saved in Session

Set maximum form field length in React Admin

Is there some way to set a field in a SimpleForm within React-Admin to limit the number of characters a user can type into that field? Based on the docs, the Re

Changing material UI button text based on a condition

I am using the material UI button for my component and want to change the button text based on a condition that if order amount is 0, show button text as "cance

React router - useOutletContext testing

I'm using react-router V6 and trying to test the new feature of useOutletContext. my testing library is testing-library/react and I'm not sure how to pass the C

How to use Material UI (mui) 5.0 inside an iframe?

I'm trying to render MUI components inside an iframe using react portal. Although they are rendered inside the iframe, they lose all thMUI components lose their

Not able to link a component in react js

I wrote a code to fetch a list of contacts, after clicking on the view detail button on the contact card, it should open a new page showing the contact details

Why Context API is worse than Redux for high frequency updates?

I saw many articles that Redux is better than Context API in performance than high frequency updates, but nothing is specific and tell why. What makes people sa

webpack < 5 used to include polyfills for node.js core modules by default

I am beginner to react js. Please someone provide input for below issue. In local system react js application is working fine but when i am generating build fr

CORS Error while calling .Net WebAPI from Axios

I have a login form from where I am calling the .Net API from react using Axios axios .post( 'https://localhost:5001/login', { email: 'abc@gmail

How change the size of UI Chip dynamically

In the following example, I am trying to change the size the UI chip in dynamically in order to respond to the font size of its parents using the em css unit. M

Routing is not working after createing of of react app in MERN app

I created a MERN app that has a node.js server. To host the website on Heroku first I have to create a build folder by it using npm run build. After that, I hav

TypeError: Cannot convert undefined or null to object in NextAuth

NextAuth.js automatically creates simple, unbranded authentication pages for handling Sign in, Sign out.So I created it like the document suggest.I created in s