475,520 questions
1
vote
1
answer
21
views
Having issues passing and calling reducer dispatch function to/in child component in Reactjs
I am having what I'm sure is a really simple issue that I haven't been able to solve yet. I have a parent component and a child component, and I am trying to pass the dispatch made in the parent ...
-3
votes
0
answers
63
views
Why does React preserve useMemo values when a parent component re-renders but recreate them after a key change?
I'm trying to understand how useMemo interacts with component identity.
import { useMemo, useState } from "react";
function Child() {
const value = useMemo(() => {
console....
-2
votes
0
answers
64
views
Reading JSON in React
I am trying to load and read a calories.json file:
[
{
"id": 1,
"Mangées": 4000,
"Viequotidienne": 2000,
"Sport": 1500
...
Best practices
0
votes
4
replies
67
views
Accessible pattern for a clickable row card that contains nested interactive elements (checkbox, buttons, icons)
Problem
I have a molecule-level component, a task row card, that behaves like a clickable container (clicking the row opens a detail side panel), but it also contains several nested interactive ...
0
votes
0
answers
47
views
Electron.js + React + Go (Fiber) build issue: React UI blank screen when backend is bundled, but works when running backend separately
I am building a desktop application using Electron.js with a React frontend and a Go (Fiber) backend.
During development (npm run dev), everything works perfectly. However, I am facing an issue when ...
0
votes
0
answers
90
views
React tutorial code shows blank page when I run it
I'm working through this React tutorial. I'm stuck on Chapter 4 - Getting Started with React. When I run this sample code, the browser just shows a blank page:
<html>
<body>
<div ...
-3
votes
0
answers
62
views
The GestureHandlerRootView is intercepting all touches and nullifying them [closed]
Here the GestureHandlerRootView is nullifying all touches, when removed all touch functionality is restored and working normally (except for the forms that use the gesture handles like the form below)....
-4
votes
0
answers
61
views
Intermittent solid black click-through rectangles in Next.js dashboard on macOS with canvas widgets [closed]
I’m debugging an intermittent rendering issue in a Next.js/React dashboard on macOS.
Parts of the dashboard sometimes render as solid black rectangles. The rectangles appear visually on top of the ...
0
votes
1
answer
86
views
First participant works, second participant breaks media publishing on AWS
LiveKit works on localhost but fails on AWS Docker deployment with PublishTrackError: publishing rejected as engine not connected within timeout
I'm building a video conferencing application using:
...
-2
votes
0
answers
112
views
React component displays both minimized and expanded audio-player controls after the first click [closed]
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 ...
Tooling
1
vote
4
replies
132
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
71
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 ...
0
votes
2
answers
102
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
127
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
70
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 ...