476,976 questions
0
votes
0
answers
14
views
TypeError: Cannot read properties of null (reading 'getConfig')
how can i resolve this problem and this my jest.config.js
module.exports = {
preset: 'react-native',
"setupFilesAfterEnv": [
"@testing-library/jest-native/extend-expect"
]...
0
votes
1
answer
30
views
Build Error in ReactPress - error TS6053: File 'src/*.ts' not found
I'm encountering an error when trying to run pnpm run dev in my ReactPress project (version 1.6.0). The build process fails during the build:config step with a TypeScript error stating that files in ...
0
votes
0
answers
13
views
Applying the onRowSelectionModelChange for React Material UI DataGrid
I'm trying to apply the row selection model in React Material UI.
Intension here is to show the rowId when a row is selected so that I can show the row action buttons as DELETE/EDIT.
I'm using the &...
0
votes
0
answers
19
views
MUI X-date-pickers output and none visible redundant characters
I'm using "@mui/x-date-pickers": "^8.19.0" and @mui/material": "^7.3.4" in a "next": "15.5.6" application with "react-dom": "19.2....
-3
votes
0
answers
61
views
Catch error thrown from child route in tanstack
I want to control conditions related to that route in each route instead of building central navigation system in the root route that checks from and to of the navigation event.
To that, my idea was ...
-1
votes
0
answers
33
views
map not loading, what could be the problem? [closed]
I’m building a checkout page with React (Vite + TailwindCSS + Redux) and using React‑Leaflet for the delivery location map. The map renders, but only the marker shows — no roads or tiles are displayed....
-4
votes
0
answers
19
views
Expo LocalAuthentication works on iPhone(IOS 26) but not on iPad mini(iPadOS 26) [closed]
A bit lost here, I have the following code running trought expo go and it does nothing on my iPad but it works fine on my phone:
import * as LocalAuthentication from 'expo-local-authentication';
...
-6
votes
0
answers
107
views
What are problems with this pattern in these situations? What is a less problematic pattern? [closed]
I have a particular situation where I need a component (ViewOne) to update a ref, and read from that ref on mount. I also have a second component (ViewTwo) that needs to render different content ...
Best practices
0
votes
1
replies
45
views
What’s the best architecture for mixing local AI + cloud AI inside a React/JS app without turning the codebase into spaghetti?
I’m trying to design a “future-proof” React/JS setup where the app can switch between different AI backends (local models like WebGPU/WebLLM, API models like OpenAI/Gemini, and maybe even custom ...
-6
votes
0
answers
30
views
How to view pdf,xlsx,docx,ppt in nextjs from s3 getobject url [closed]
My s3 url is getobject url - .pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=&X-Amz-Date=&X-Amz-Expires=&X-Amz-Signature=&X-Amz-...
0
votes
0
answers
41
views
getting spacings and alignments in jsonforms correctly
Currently, I'm trying to use jsonforms to create different forms for my website, and I'm using custom buttons and input fields (using custom renderers) to render the form, currently I'm interested in ...
0
votes
0
answers
26
views
How can I create an in-curved notch/cutout in a div border where another div overlaps it? [closed]
I'm trying to recreate an overlapping box layout where one box appears to "intrude" into another box's border with a smooth, curved notch effect (not just a straight cutout).
Here is the ...
-3
votes
1
answer
58
views
The proper way to assign a default value to a React component prop
I'm looking for a working & elegant solution to assign a default prop value to a React Native core component such as Text.
In the past, we'd do something like this and override it at the index.js ...
0
votes
2
answers
50
views
How to display <NavLink> components outside MemoryRouter in React Router? [duplicate]
How to display <NavLink> components inside the Footer? I cannot place the Footer inside RouterProvider. The Footer component should be displayed on every page.
function App() {
const router = ...
2
votes
1
answer
65
views
React 18 streaming chat messages updating with stale state
i’m building a small AI chat ui in react (next.js app router, react 18) that streams tokens from my backend (openai style stream). basic flow:
user types a prompt
i push the user message into ...
0
votes
0
answers
48
views
React SSR (being used as binding in cloudflare) HMR required in cloudflare worker
I'm working on a project, which uses a react SSR module (using Vite). Then I'm using a seperate worker which loads my site and there's link /load-ssr which loads the SSR module as a "binding"...
-4
votes
0
answers
30
views
Next.js: Hydration failed por “Unexpected attribute cz-shortcut-listen" — como resolver? [closed]
Pergunta
Estou recebendo o seguinte erro ao iniciar meu projeto Next.js:
Hydration failed because the initial UI does not match what was rendered on the server.
Unexpected attribute: cz-shortcut-...
-2
votes
0
answers
36
views
Supabase realtime postgres changes with RLS policy [closed]
Im having an issue with supabase postgres changes. I have a subscription on frontend to watch for changes on a table using RLS policy to only see the changes of the current user.
The problem that im ...
0
votes
0
answers
38
views
PrimeReact InputNumber causes "Failed to execute 'removeChild'" only on macOS (Safari/Chrome) when toggling edit mode in React
I have a React + PrimeReact component that displays static text, and when the user clicks an edit button it switches to editable inputs (InputText, InputTextarea, InputNumber, etc.).
The entire ...
Best practices
1
vote
4
replies
118
views
What do you think is the best practices when working with React projects?
I want to hear your personal opinion. And I would like to hear what way y'all prefer when working with React projects.
I'm currently working with a full-fledged ecommerce website. I would love to hear ...
0
votes
0
answers
32
views
Unexpected stale state in React when setState runs inside a loop [duplicate]
Why does updating state in React inside a loop cause stale values even when using functional updates?
0
votes
1
answer
52
views
How to remove the iOS accessory bar on mobile?
On a React App, I'd like to remove the accessory bar that appears above the iOS keyboard when we are focusing on a textarea. Is it possible ? I tried a few things saw on the internet but nothing works ...
0
votes
0
answers
60
views
Vercel build error: “Cannot find module '../lightningcss.linux-x64-gnu.node'” when building (Vite + Tailwind + React) project [closed]
I’m trying to deploy my personal website to Vercel using Vite + React + Tailwind CSS. The project builds and runs fine locally (npm run build works without errors), but the Vercel build fails with the ...
Best practices
0
votes
3
replies
72
views
Using setTimeout within useEffect() to debounce searching in react native pagination
I am planning to implement pagination into my project for my data from Supabase, I had the idea that since there are different parameters (such as search text, page number, filter) that I should use ...
Advice
1
vote
2
replies
67
views
React Router v7 SPA mode: How to use strict CSP?
I'm migrating an app from React Router v6 + Webpack to React Router v7 (SPA mode) + Vite and I'm having issues with setting a strict Content Security Policy.
In RR6 I had a normal index.html and ...
0
votes
2
answers
93
views
How to skip debounce on the first keystroke only?
I have a simple debounce implementation using `useEffect` and `setTimeout` that delays updating a `value` state by 1 seconds after the user stops typing in an input:
import { useEffect, useState } ...
0
votes
1
answer
55
views
App Freezing when I submit a form using Actions in Next app?
I'm currently working on my first NextJS app after a long hiatus. The first thing I'm working on is a small app that's powered by Firebase.
After reading some documentation on Context and then ...
Best practices
0
votes
2
replies
88
views
Best way to initialize data in next js app router with zustand
I’m building an e-commerce type website in Next.js where there are multiple sections of stores. Each store card has a heart icon to mark it as a favourite.
The same store can appear in:
multiple ...
Advice
1
vote
1
replies
45
views
I would like to know why the ref in my onMessage handler requires spreading before flushing
Here is my on message handler:
const onMessage = (event: MessageEvent) => {
try {
const message = JSON.parse(event.data);
const normalizedMsg = Array.isArray(message) ? message : [...
2
votes
0
answers
57
views
Module Federation with React Vite: React-Three-Fiber Canvas Not Loading, "Cannot read properties of undefined (reading 'current')" [closed]
I'm building a React Vite application for 3D modeling using react-three-fiber. I recently integrated a microfrontend (MFE) using the module federation plugin and shared React and other core packages ...
-1
votes
0
answers
75
views
Can a React (Vite) SPA prevent a component from being included in the client bundle until after backend authentication? [closed]
I have a React (Vite) frontend and a FastAPI backend.
I want to protect /dashboard so that the Dashboard.jsx component is not downloaded by the browser unless the user is authenticated.
In a normal ...
1
vote
0
answers
54
views
How to make custom Web Components with Tailwind CSS react to container width instead of window.innerWidth? [closed]
I'm building an embedded widget as a Web Component using Vite + Tailwind CSS.
When the app runs standalone, Tailwind responsive breakpoints (sm, md, lg, xl) work correctly, because they react to ...
-1
votes
0
answers
25
views
How to debug on stage environment on AEM Cloud for custom service Interface and implementation class [closed]
We have a popup functionality that works fine on AEM as a Cloud in Dev and Local environments, but it’s not working in Stage and Prod.
Here’s the setup:
We are using Sling Model Exporter and an AEM ...
-1
votes
2
answers
86
views
tailwind classes are loaded but coloring css variables no applied
I am using TailwindCSS in my React + Vite project, and the classes are loaded correctly. The UI looks complete.
The problem is that colors from variables defined in tailwind.config.js are not applied.
...
0
votes
1
answer
28
views
multi-select jumps to old selection if clicked and updates properly later
In my react application I have a simple html select that has the multiple attribute set.
When the selection changes a server request is issued and afterwards the component is re-rendered.
The problem ...
Best practices
0
votes
2
replies
48
views
React RTK Typescript: Using `ReturnType<AppStore['getState']>` vs `ReturnType<typeof store.getState>` when inferring RootState type
I've been reading up on React/Redux documentation, specifically on setting up types for the main redux application store, and was wondering if there are any significant differences when it comes to ...
Tooling
0
votes
1
replies
50
views
Azure App Service: Extracting a 60MB node_modules ZIP takes longer than running npm install — how to speed this up?
I have an automated deployment tool that generates a React or Angular project, uploads it to Azure App Service, and then restores node_modules to reduce build time.
To avoid running npm install on ...
-1
votes
0
answers
42
views
Displaying/Rendering multiple TIFF/GeoRaster layers on React-Leaflet Map [closed]
I'm working on a React project where I'm using React-Leaflet and need to display GeoTIFF (.tif) layers on multiple maps within the same page.
Overview: I have several Leaflet maps rendered ...
-1
votes
0
answers
50
views
Is there a way to call the tRPC client with tRPC and @tanstack/react-query setup? [closed]
I have set up my tRPC backend as per the docs which I'll paste in below. My issue is using it with @tanstack/react-query works perfect for 90% of my use cases but I can't physically call my backend ...
-1
votes
1
answer
88
views
scope of the state variable defined using useState in a doubly nested function in react [closed]
I was trying to learn React using this tutorial: https://react.dev/learn/tutorial-tic-tac-toe.
The code I am sharing below just builds 9 squares, and creates two state variables: turn and value. The ...
1
vote
1
answer
62
views
How to find coordinates of a polygons vertices
I have a React application that uses React leaflet to render a map and I can draw a polygon on the map using a function I've written. I want to submit the polygon that's drawn to an SQL database and I ...
-2
votes
0
answers
41
views
Error entering clerk's email verification code [closed]
I am building a mobile application and the framework I am using is React Native + Expo. When it comes to verifying the clerk's email, there is an error that the verification failed. I received the ...
Best practices
0
votes
2
replies
50
views
Best approach to make a form with multiple models with laravel inertia and react
I'm currently learning inertia with react after using livewire and finding myself quite limited so I'm making a sample project that makes invoices to practice making forms and saving data to a ...
Best practices
0
votes
1
replies
72
views
How handle I correct a SVG icon in React?
I use SVG icons in a typescript / react application. The icons are in a SVG file. Every icon has an ID tag (the common way).
In code I reverence the icon:
<svg className="icon icon-lg" ...
Advice
0
votes
5
replies
72
views
Deploy Laravel version 12 (PHP, Inertia, ReactJS, Tailwind) to cPanel shared with no SSH Access
I have Laravel 12 project (PHP, Inertia, ReactJS and Tailwind) project that I need to deploy to a cPanel shared server. I do not have SSH access to the server, and the service provider does not give ...
-1
votes
0
answers
44
views
How to override Radix theme ::before ::after styles [closed]
I am using Radix theme https://www.radix-ui.com/themes/docs/overview/getting-started and I am specifically using the Table component.
I want to override default styling for just the Table.Header ...
0
votes
1
answer
137
views
Position sticky top animation works only when scrolling down, otherwise there is a jump
I have a sticky bar on the right side of my page and I want to animate its top property (and height) to nicely fit its transition to disappearing announcement bar at the top of the page. Below video ...
-4
votes
1
answer
61
views
Vercel live site not updating UI changes after successful GitHub push and redeploy [closed]
I am building a Habit Tracker application using React (Vite) and Tailwind CSS, deployed on Vercel.
The Problem: I recently updated a component (HabitList.tsx) to fix a UI issue where an input field ...
-1
votes
0
answers
48
views
Component Re-mounts on redux state changed [closed]
As soon as I use dispatch to change a property of the object in redux state, suddenly the whole component re-mounts in react native. Below is a part of my Slice.tsx:
const initialState = {
...
-1
votes
0
answers
42
views
loaderDeps running multiple times and sometimes missing search param at all
I see this super weird behavior, I have extremely basic route definition:
import { createRootRoute, createRoute } from '@tanstack/react-router';
export const rootRoute = createRootRoute({
component:...