475,474 questions
Score of -1
1 answer
75 views
How do I use react router to generate pages that share a layout at build time? [closed]
I have a database table Flyers that I update once a week with a new flyer, and I want to be able to generate a page for each row in the table, instead of creating them one by one, in this way:
www.my-...
Score of -1
1 answer
66 views
Probable solution for A2UI React normalized cards rendering issue [closed]
I was having issues with rendering LLM generated A2UI cards on my react frontend with TailwindCSS.
I initially tried the official A2UI npm package, but constantly getting hit with zod errors such as ...
Score of 0
0 answers
118 views
React Hook Form validation across multiple tabs: is useWatch + custom validation the right approach?
I am working on a React application where a single form is divided across multiple tabs. The form is managed using React Hook Form, while each tab contains a separate group of fields.
The issue is ...
Score of 0
0 answers
43 views
Next.js hydration failed because server rendered HTML doesn't match client, but diff shows data-ai-detector-processed attribute [duplicate]
I'm getting a hydration mismatch warning in a Next.js application.
Environment
Next.js (App Router)
React 19
Using next/image
Error
Hydration failed because the server rendered HTML didn't match ...
Score of -6
0 answers
82 views
API call in React cannot access response [duplicate]
I am currently learning Node, Express and React and have an Express API plus React front end on my localhost. The API call is getting the following data, but the React component is unable to read it.
...
Score of -2
1 answer
123 views
React state updates correctly but UI displays previous value after async operation [duplicate]
I have a search component that fetches users as the query changes. The state seems correct in React DevTools, but sometimes the UI displays results from an older search.
function UserSearch() {
...
Advice
2
votes
1
replies
104
views
react-router OR react-router-dom
I had a question about why we need to have two types of react-router and react-router-dom and I wanted to understand the difference between these two packages and which one is better for today's webs ...
Tooling
0
votes
3
replies
98
views
How should I structure a React layout component with Navbar and Outlet?i
I am working on a React app using react-router-dom. I have a layout component that renders a Navbar, an Outlet, and also accepts children. I also have a reusable Hero component for page headers.
The ...
Best practices
1
vote
3
replies
116
views
How to implement role-based navigation in a React Navbar using Context API and React Router?
import { useState } from 'react';
import { Link, useLocation, useNavigate } from 'react-router-dom';
import { Menu, X, Target, Receipt, ScanSearch, TrendingUp, Home, ShieldAlert, BookOpen, User, ...
Score of -2
1 answer
86 views
How should I structure a React layout component with Navbar and Outlet? [closed]
I am working on a React app using react-router-dom. I have a layout component that renders a Navbar, an Outlet, and also accepts children. I also have a reusable Hero component for page headers.
The ...
Score of -2
0 answers
68 views
How to fix TypeScript type mismatch between Supabase generated types and React component props? [closed]
I am developing a full-stack web application using a modern React component library and strict static type checking configurations.
In my project setup, I have established a custom dashboard interface ...
Score of -4
0 answers
69 views
The React's select component value does not change in the UI (the data fetched from C# API) [closed]
I'm working on a React / Next.js project using Refine package with in build tools and component. I have a problem: I'm getting data from a C# API into my project's Edit page (where I'm updating user's ...
Score of -2
1 answer
100 views
How do I manually close a headlessui dropdown menu?
I'm building a Next.js app using the headlessui library. I want each menu item to be a Next <Link>, and I want the menu to close when clicked. The documentation explains that "some third-...
Score of -1
0 answers
63 views
Razorpay Payment integration issue [closed]
I have integrated razorpay on my MERN Stack website. Whenever I click the upgrade now button on my website, it's not redirecting to razorpay Instead your browser not supported alert comes. I tried ...
Score of 0
0 answers
126 views
360 degree Youtube embed controls
I'm trying to show a 360 Youtube video in a react & vite project. I get the video to open up, but whatever I try it just doesn't get the controls in it.
Just as an example this hasn't worked (I've ...