475,783 questions
Advice
0
votes
3
replies
63
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 ...
-1
votes
0
answers
25
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
18
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
1
answer
69
views
useEffect not running on route change when navigating between dynamic segments in 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
52
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
102
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
173
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
78
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
66
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
52
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
71
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
43
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
46
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 ...
Advice
1
vote
2
replies
71
views
How to dynamically update SEO meta tags in React using native DOM API without third-party libraries?
Problem
I'm building a React app with Vite (not Next.js) and I need to manage SEO meta tags properly across all pages. I need:
A site-wide title template like %s | My Site applied automatically on ...
-2
votes
0
answers
30
views
Tailwind install error “could not determine executable to run” in Vite + React + TypeScript [duplicate]
I’m setting up a new frontend project using Vite with React and TypeScript. When I tried to install Tailwind CSS using the standard steps:
npm install -D tailwindcss postcss autoprefixer
npx ...