Category "reactjs"

Bootstrap validation in a dual-purpose form not working

I have a form that is used for both Adding and Editing an Organisation. If the form is in Add mode (default) then you also create a default Admin user as part o

Detect React/ReactDOM development/production build

React development build behaves differently than production build, e.g. error handling. It can be figured out which one is used from the environment but only i

Problems with React Scroll and scroll-snap-type

I'm trying to use scroll-snap-type: y proximity;, but it isn't working well with react-scroll. I find that the page is scrolling in HTML tag and when I set over

create-react-app .env: process not defined

create-react-app is supposed to inject your .env variables into your React app. I have used the REACT_APP_ prefix with my variables in my .env and .env.developm

Uncaught Error: Shared module is not available for eager consumption in React module federation

consumes:146 Uncaught Error: Shared module is not available for eager consumption: webpack/sharing/consume/default/@emotion/react/@emotion/react?99ca at Obj

Optimize the display value in React Js

Please let me know how I can optimize more below code in one line: {addressToDisplay?.addressLineOne} {addressToDisplay?.addressLineTwo} {addressTo

Why is heroku giving error code H81 on deployment of react app

Im deploying full stack react app to heroku. I followed the steps provided on heroku using the cli -logged in using my credentials -ran heroku create -added

React Native text string must be rendered within a text

Hello the react native code below takes care of displaying a ui, when I run the code I get the following error? come I solve this? The text it indicates is alre

Styling List with React PDF

I have created a small React app to test out React PDF. When the download link is clicked it creates the pdf as intended. My problem is that I have created a Di

Can I measure my users' internet speed in my react web app?

I built a small react web app and I'm noticing that some users are dropping off constantly. I know that fast.com appears to measure web speed by having the cli

How to setup getStaticPaths of multi-locale dynamic pages in Next.js

Today, in my side-project, I got a problem relate to setup getStaticPaths of multi-locale dynamic pages in Next.js. I researched and find out that there are so

How to close bootstrap modal programmatically in react js

I have the following component which is modal code component : import React from "react"; export default class AddNewList extends React.Component{ constr

Remove blue outline from Select box React Material UI

I'm using a React Material UI Select component in my project. I've managed to get most of the desired custom styles, but there is still a blue outline around th

Which Carousel Library is best for achieving the following effect (react)?

[1]: https://i.stack.imgur.com/AqE6r.png**strong text** Does anyone know which carousel library is best for achieving this effect, with the previous and next pi

react_dom_client__WEBPACK_IMPORTED_MODULE_1__.render is not a function show in the console of localhost:3000

after I created react.js project when I put any type of code it doesn't show in the localhost so when i inspect and open the console tap it show me this error:

npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/react-is (over 30000ms)

When I want to create a react app I'm encountering the following error: npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/react-is

Error ENOENT: no such file or directory for inversify files in React when using Ant Design Charts

This problem only exists when I'm using Ant Design Charts. I'm currently using React 18 (using create-react-app) and I tried using Ant Design Charts for my gra

Express res.download()

I don't know why it's happening, but it's really annoying. I expected the file to be downloaded according to the express docs. I have the next code: //in rea

Ag Grid React. Master Detail Chevron Doesn't show if grid has a rowModelType of viewport

I've added props necessary to enable the master detail grid (i.e. masterDetail, detailCellRenderer, and frameworkComponents). The master detail grid functionali

Call api before first render in functional component in React.js

If I want to call API after the first rendering of component, I know we have useEffect hook to call the API method. (I am talking about functional components on