475,545 questions
Tooling
0
votes
0
replies
24
views
What would be the most optimal way to creating an admin dashboard if im using supabase?
I am working on my FYP which is a SafeQR scanner that uses supabase as its backend. I had some ideas like tying the admin dashboard to an Ip address but the Ip will be changed when I restart the ...
0
votes
0
answers
51
views
React component displays both minimized and expanded audio-player controls after the first click
I am building a simple static website to learn React, JavaScript, and Tailwind CSS.
I created an audio-player component that can be minimized and restored. The component generally works, but I am ...
-3
votes
0
answers
45
views
Why does React StrictMode create duplicate WebSocket subscriptions even when cleanup runs correctly? [duplicate]
I'm debugging a React 18 application that establishes a WebSocket connection inside a custom hook.
function useSocket(url) {
useEffect(() => {
const socket = new WebSocket(url);
socket....
Tooling
1
vote
4
replies
118
views
How can I add a label below a QR code and export it to PDF in React?
I am working on a React project where I need to export the QR code along with the custom labels in PDF format.
What is the recommended approach to achieve this ?Are there any libraries or best ...
-2
votes
0
answers
55
views
Tailwind CSS 4 "Cannot apply unknown utility class lg:" [duplicate]
I started a React.js project with Tailwind CSS 2 days ago. Today I opened my project, and it showed me this "Cannot apply unknown utility class lg:" error. Although lg: is a valid Tailwind ...
-2
votes
1
answer
108
views
React component behaves differently in production (AWS Docker) than localhost [closed]
React component behaves differently in production (AWS Docker) than localhost
I have built a video conferencing application using React, Node.js, Express, LiveKit, Docker, and AWS EC2.
Expected ...
1
vote
1
answer
65
views
React Native Reanimated SVG Circle Progress initial animation not working, but prop updates animate correctly
I am a beginner with React Native Reanimated.
I have a circular progress component using Reanimated and SVG. The animation works correctly when the progress prop changes after the component is ...
3
votes
0
answers
124
views
Cannot find module 'react/jsx-runtime' or its corresponding type declarations after switching to pnpm from npm
I'm getting the following TypeScript error after migrating my Next.js project from npm to pnpm:
This JSX tag requires the module path 'react/jsx-runtime' to exist, but none could be found. Make sure ...
Best practices
0
votes
1
replies
57
views
What is the recommended architecture for preserving infinite-scroll state and scroll position across navigation in Next.js applications?
I'm building an e-commerce application with an infinite-scrolling product list.
A user may scroll through multiple batches of products, open a product detail page, and then navigate back to the ...
Best practices
2
votes
0
replies
66
views
How can I measure whether React dynamic imports are actually improving application performance?
I am working on a large React application and have started using dynamic imports with React.lazy() to reduce the initial bundle size.
Example:
const Dashboard = React.lazy(() => import('./Dashboard'...
Advice
1
vote
4
replies
110
views
How do I generate SEO-friendly meta tags in React?
I'm developing a React-based website and want to improve its SEO performance. Since React applications often render content on the client side, I'm looking for the best way to manage dynamic meta tags ...
-2
votes
0
answers
37
views
React Query returns stale data after mutation even though query invalidation is triggered [duplicate]
I am using React Query to manage server state for a user management page. Users can update profile information through a form, and after a successful update I invalidate the related query so that ...
-1
votes
1
answer
115
views
React useEffect cleanup function not running when component unmounts inside conditional render
I'm building a chat component that subscribes to a WebSocket when mounted and should unsubscribe on unmount. The cleanup function in useEffect doesn't seem to fire when the component
is removed via a ...
-3
votes
1
answer
152
views
How do I use useRef as input in a function with TypeScript? [closed]
I am trying to make an automatic scroll preference in production environments. For the scrolling utility for my React website I have chosen TypeScript due to what I have heard about its ability to ...
Best practices
0
votes
0
replies
64
views
What is the best strategy for managing permissions and role-based access control (RBAC) in a large React application?
I am working on a large React application that supports multiple user roles such as Admin, Manager, Editor, and Viewer. Each role has access to different pages, components, actions, and API operations....