Category "reactjs"

Typechecking React library with Styled Components

I'm currently working in a design system library to test some things. Basically, the library is a Styled Component wrapper in order to create themes. I built th

Only send values that have changed in formik onSubmit

I have a small table of data that is pre-filled by an api call on page load. Each row in the table has a facility name and an Enabled value which comes from the

Emailjs working in development but not in production

I have a Next js app that have a contact form. I'm using Emailjs to send email to my gmail account. This works perfect in development, but once I deployed it st

In reactjs and nextjs constructor getting Reference Error: localstorage is not defined

i make system jsonwebtoken in reactjs and use nextjs. i find problem when i run the code in browser that is localStorage is not defined. this is my code in fil

Firebase denies access when using env file

I am trying to create a react-app that works with firebase. So, normally the credentials look like this: const firebaseConfig = { apiKey: ..., authDomai

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