475,744 questions
-1
votes
0
answers
62
views
Hot reload on Next.js routes still shows an error even after the bug has been fixed [closed]
I'm new to React and Next.js, and I'm running into a really annoying caching issue.
When I have a api/auth/route.ts , and an Ecmascript parsing error is detected in this file, even after I fix the ...
-5
votes
0
answers
49
views
Webpack[React] migration from v4 to v5 [closed]
enter image description here while migrating all third-party plugins from older versions to the latest versions, bundle code which is generated after running npm run build, is not transpiled to ES5. ...
Advice
1
vote
7
replies
150
views
What are good ways to improve a simple React user administration app?
I built a simple user administration app in JavaScript/React. It covers the basics, listing users, adding, editing, and deleting them, but I feel like there's a lot of room for improvement and I'm not ...
-2
votes
0
answers
39
views
Mantine form validation error appears on button click before submit (conditional submit buttons inside modal)
I’m using Mantine useForm with Yup resolver inside a modal. I have a two-step UI:
Step 1: Action selection
User clicks either Approve or Reject
Step 2: Remarks + final submit
After clicking action, I ...
0
votes
0
answers
26
views
Hook errors in MUI Data Grid with fresh install [duplicate]
I am using a stripped down version of the example used in the documentation, however I get these errors:
Here's my code:
import Box from '@mui/material/Box';
import { DataGrid, type GridColDef } from ...
0
votes
2
answers
124
views
Why is useEffect not running on route change when navigating between dynamic segments in my Next.js app router?
I am building a Next.js 14 app using the App Router. I have a dynamic route /products/[id] and I'm using useEffect with the params.id as a dependency to fetch data whenever the user navigates to a ...
Advice
0
votes
2
replies
56
views
Starting to learn React, at first it got executed but now its not, and giving such errors
[plugin:vite:import-analysis] Failed to resolve import "./src/assets/Header.jsx" from "src/App.jsx". Does the file exist?
C:/Users/MCLAREN/Desktop/Website react/my-react-app/src/...
0
votes
1
answer
106
views
How to have one element always be right above a chosen other element
I'm working on a calendar for a project where, when a chosen event is clicked, a pop-up box is supposed to appear right above the clicked element. I originally tried to do it where it works based on ...
1
vote
2
answers
183
views
How to redirect user to home if they're already logged in and is trying to access the login page?
I have a component that redirects the user to whatever protected route they were trying to access after they log in via:
export const ProtectedRoute = () => {
const { token } = useAuth()
const ...
Advice
0
votes
3
replies
80
views
How would i sign a user out once the jwt token expires in react?
I currently get a jwt token from my backend and save it in my localStorage, and i would like the session to expire after a certain amount of time, and automatically sign the user out, what would be ...
-1
votes
0
answers
69
views
How to combine parent staggerChildren with individual animations when dynamically adding items?
I am building a dynamic list in React with Framer Motion. I want to achieve two goals:
When the list initially mounts, the items should animate in sequentially using the parent's staggerChildren.
...
-2
votes
1
answer
55
views
How to automatically clear Next.js cache folder in production? [closed]
I’ve noticed that my Next.js application keeps accumulating cache over time in production. After a couple of weeks, the cache size grows significantly (40–50GB), and much of it appears to be ...
2
votes
1
answer
89
views
Why Does startTransition Trigger High-Priority Updates and Re-renders Even Without State Changes?
I came across the following statement:
Calling startTransition, even if no updates are triggered inside it, will still cause both a high-priority update and a low-priority update.
To check this ...
Advice
0
votes
0
replies
45
views
How to set dynamic meta tags in a React SPA so they are visible to search engine crawlers?
I’m working on a React-based website where most pages are rendered dynamically. The issue I’m facing is that meta tags like title and description are not being properly indexed by Google for ...
Advice
0
votes
3
replies
47
views
How do I deal with a bookinglist in a vehicle management system
How do I write a code in reactjs for a booking list to enable an admin be able to get all bookings made by customers and be able to accept and reject the bookings while the customer on the other hand ...