Category "reactjs"

Printing multiple pages not working in React-to-Print

we are loading 100 records in the grid initially, after that when we scroll down , loading another set of data. But when we try to print the page its loading ju

React router order of routes, does it matter?

I set up my react router like this: <Route exact path="/users"> <component/> </Route> <Route exact path="/users/:id"> <compon

Can't get Data while fetching from React Error(304)

While i'm using axios to fetch data it's return 304 on React . But it's work on Postman ! const [mangas, setMangas] = useState([]) useEffect

Next.JS - Access `localStorage` before rendering page

Let's say I have a user's account information stored in localStorage (client side). I need my Next.JS app to render the webpage's navbar based on what's stored

firebase package was successfully found. this package itself specifies a `main` module field that could not be resolved. none of these files exist

node_modules\firebase\package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved node_modules

CSS showing differently for Deployed then localhost when moved from material-ui version 4 to mui version 5

Image for Development Environment: Image for localhost: As is visible jss6 css is what is coming from makeStyles-sidebar 6 but on deployed version there is so

(Yup) how to create multiple errors using a single .test() function

EDIT: while the accepted solution worked, this worked much better in my use case I have one function that validates that neither input field A nor input field B

useinterval in react (polling request)

I've created a simple react (nextjs) app that sends some data to a backend server. While the data are being processed the react app keeps track of the progressi

Css not updating react component

/* Here is my container in my react component */ <Container fluid className="graph-container"> <Tabs id="graph-buttons" var

I need to subtract the count and update the remaining count

I am using TextField that field data I am adding into the table that works fine what my task is I have one field called Total no of count their I am storing my

Using design frameworks for teams

We are building our web app and want to choose right design frameworks. Our plan is to build a stand alone web application and then to integrate it with Microso

Node/Express Cannot POST error (React frontend)

For my React/Express app, I've already built my backend API in Express, including a route for posting a blog post (/api/posts). On the front end, I built a form

React - Cannot find module fs and require is not defined

I am using React to build a web app. I never called fs in a file and everything worked fine until I suddenly got this error: Uncaught Error: Cannot find module

How to implement authentication for the nested routes in React-Router 6?

I am trying to implement authentication for my routes like this using react-router v6 <BrowserRouter> <Routes> <Route path=

Type '{ author: Author; }' is not assignable to type 'IntrinsicAttributes & Author'

I am totally new to TS and react and I ran into a problem. I tried searching many places and can't seem to fix it. The whole error message is: Type '{ author: A

How can I merge multiple reducers?

I have a file structure like below store index.js reducers organize index.js user index.js index.js trying to combine organize and user reducers to reducers/

React State update with button click from another component

Please read the details below of code enter image description here This MegaMenu Component import MenuIcon from '@mui/icons-material/Menu'; import './MegaMenu.c

Linking components in React using React Router Link not working

I am new to React and I am creating a portfolio web page in which I am trying to connect two components with the Link component in react-router-dom (similar to

how to re-register the service worker with next-pwa

I am using next-pwa package with my next.js applications for PWA features. But I am having a problem here. Everytime, I rebuild and redeploy the application, it

what is the correct way to use Sass and React JS?

I have a question. I´m Learning how to use React JS 18v. My question is: what is the best way to use Sass with React? how do you compile it? I don't want