593 questions
1
vote
0
answers
72
views
Why can't I select an option in an Autocomplete MUI component when testing?
I am building a React application. In one of my components, the first thing that appears is a dialog where you have to select an option from an autocomplete component. This is mandatory for the ...
0
votes
0
answers
108
views
Trying to implement drag and drop in my React project via my Kanban component
as part of a group project, I am trying to set up a kanban system similar to those used by YouTrack, Trello, and others to manage project tasks from one status to another by moving them from one ...
1
vote
0
answers
79
views
Is there a way to put all default table header buttons in dropdown menu with antd?
I use Ant-design Pro-Components for one project. Recently I had a problem with default table header buttons. I need to 'hide' them inside menu button that should open dropdown list. However, I can't ...
3
votes
2
answers
330
views
How to use a custom component with the <Trans> component in react-i18next while passing children?
I'm trying to implement a language switch using react-i18next in a React TS app. firstly i added text manually in english and created a TextHighlight component looking like this:
import React from &...
3
votes
1
answer
390
views
How to use enviroment variables in Tailwind v4 (react-vite)?
At my current job, we use .env variables to set the main colors of the web pages. I've been using the new TailwindCSS setup where you define everything in index.css, but I haven't found a way to use ...
1
vote
1
answer
95
views
Module not Found when using Custom Type .d.ts in Next.js
My question is extremely similar to this one: Use custom TypeScript typing .d.ts in nextjs (Module not found: Can't resolve ...)
But the answer there doesn't seem to work for me.
Basically, I just ...
0
votes
0
answers
24
views
How to avoid seeing ids of intl translations upon refreshing the react webpage?
I decided to use Intl on React because it can be combined with babel to automatically scan the app for strings to translate. The issue is that upon refreshing the page I can see shortly the 5-...
0
votes
0
answers
75
views
React Query Stuck in Loading State on 406 Not Acceptable Response with Axios
I'm using React Query (@tanstack/react-query) to fetch RDF data from an API with Axios, but when the API returns a 406 Not Acceptable response, the query remains in a loading state indefinitely ...
1
vote
1
answer
172
views
Using useFormState in a react-admin Form seems broken
I try using the hook useFormState from react-hook-form in a react-admin form
I am a beginner for both modules so maybe I use them wrong but I searched through both of the documentations and I could ...
0
votes
0
answers
15
views
How can I integrate Picco CSS with React while ensuring the same styles are applied when using the className attribute in React components?
<nav>
<ul>
<li><a href="#" class="secondary">...</a></li>
</ul>
<ul>
<li><strong>Acme Corp</strong>&...
0
votes
0
answers
172
views
How to Separate Drag, Click, and Select Events in React Flow to seperate onNodeClick and onSelectionChange Behavior Clashes?
React Flow: Prevent onSelectionChange from Triggering on Node Click and Drag
Issue
I'm using React Flow (XYFlow) to implement a selection box that, when released, fits the view to the selected nodes. ...
2
votes
1
answer
73
views
Need to resolve type error on MUI Barchart
I have developed a barchart with some fancy logic for bar labels which works in development but will not build unless I resolve the type error. I have tried extending BarChartProProps without success....
0
votes
0
answers
26
views
Next.js runs without issues in development mode (npm run dev), but after building (npm run build) and starting (npm run start), an issue occurs
My code
import { Metadata } from 'next';
import Markdown from 'react-markdown';
import remarkGfm from "remark-gfm";
import rehypeRaw from "rehype-raw";
import { apiLink } from '@/...
0
votes
0
answers
63
views
Fetching a JSON schema via an API call in the react-jsonschema-form library
How to fetch a JSON schema via an API call to my server in the react-jsonschema-form library?
Any example is welcome.
0
votes
0
answers
35
views
How to create a typed component that given some data renders it when all data is available
I am trying to create a component that looks something like this:
type FN = (...params: any[]) => React.ReactNode;
export type LoaderProps<T extends FN> = {
data: Partial<Parameters<...
1
vote
1
answer
53
views
How do I change the text color of a TextField component from Material UI using TailwindCSS?
I'm trying to change the color of a TextField component from Material UI, both the label and the input text only using TailwindCSS.
Current MaterialUI version: 6.1.2
Current TailwindCSS version 3.4.1
...
0
votes
1
answer
760
views
Undefined @mixin after updating sass-loader and sass to the latest versions in React TS
I have the following issue when running command npm run build in my React TS app
ERROR in ./src/main/webapp/app/app.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js)...
0
votes
1
answer
74
views
Typescript-React Arrow Function Parameter Typing
When using Typescript and passing an arrow function into another function as parameter, what would the type callout be?
My situation is with React components, and I'm trying to pass an activation ...
0
votes
0
answers
41
views
Data Grid - Editing - MUI add from API
I'm using Data Grid - Editing of mui to add a new row
When I click su Add Row I set a new row with empy field:
setRows((oldRows) => [...oldRows, { id: 0, aliquota: 0, descrizione: '', tipo: '', ...
0
votes
0
answers
128
views
Google OAuth API throws TypeError in a React+TS project
Everytime a user visit the OAuth url, my program throws exception as follows:
"TypeError: Failed to execute 'query' on 'Permissions': illegal invocation"
while the page stucks up with ...
0
votes
1
answer
61
views
I got an error when providing the above='md' prop to <Show>
import { Grid, GridItem, Show } from "@chakra-ui/react"
function App() {
return <Grid templateAreas={
{
base: `"nav" "main"`,
md: `"nav nav&...
4
votes
5
answers
918
views
TypeScript Error: Property 'above' does not exist on type 'ShowProps' in Chakra UI
I'm following a tutorial that uses Chakra UI, and the following code works perfectly in the tutorial. However, in my project, I get a TypeScript error on the above prop in the Show component:
import { ...
1
vote
0
answers
103
views
How can use my webcomponents stencil in my project React-TSX
I have my component library installed and I define the defineCustomElements, and so I can use all my components if I use react JS but, if I use react TSX when using the component, I get an error
...
0
votes
1
answer
66
views
Using async to display form in React when API handling is in another class
When I started my project, I made a class that handles the API data. Now I can't figure out how to manage the async to properly display the data. I have a console.log in fetchOpenings that will show ...
2
votes
0
answers
100
views
is there an alternate way of using the waitfornextupdate function from the react-hooks library in react 18
so i was working on a jest test file that is testing a hook that deals with session management and the project has moved forward to react 18 which made the testing library, react-hooks, deprecated. I ...
1
vote
0
answers
30
views
TSX: a variable set to either a Map<string,string> get() result or '' is shown as "string | undefined"
TSX question. I define an ES6 Map which is Map<string,string>, where all of the following constants are strings. There are no issues here.
export const CALLER_TYPE_TITLE_MAP = new Map<string,...
0
votes
1
answer
284
views
How do I use the reverse border radius at the top of a card? (react native)
I'm trying to create a red box that has a notch on the top edge in React Native. This notch should have rounded corners with an inverted border radius. Then I wanted to write a word in the notch, with ...
0
votes
1
answer
97
views
React Mui card refresh on react / Component refresh
import Typography from '@mui/material/Typography';
import { Grid, Card, CardContent, Box} from '@mui/material';
import MainCard from 'components/MainCard';
import UploadGP from './components/UploadGP';...
1
vote
1
answer
95
views
Problem with TanStack and 'useIniniteQuery', 'isFetching' property always on true
I'm trying to learn how to use TanStack with TS, but I have various problems, I'm trying to execute this line of code, to obtain the data out of an API.
const { isLoading, isError, data, isFetching, ...
1
vote
1
answer
181
views
Path redirection not working when website is deployed to Vercel, error 404
I have a website deployed to text which is connected to the repository text. The issue here is that Vercel works perfectly until you click any link in the navbar (except for 'Oscar Rodriguez').
All ...
-1
votes
1
answer
95
views
Running a React and Aspnet project on local network
i have been building a server manager for DayZ for a while now and recently I migrated my files into a new project with Asp.NET backend and React and TypeScript frontend.
The Server itself works well, ...
0
votes
0
answers
40
views
MVC pages are not running with ReactTS
We have a web application which runs on .NET 8 (recently we migrated from 5 to 8).
Now the team is planning to build new screens in ReactTS and merge these screens with the existing .NET 8 web ...
0
votes
1
answer
349
views
I can not place what causing NativeWind props to not be recognised in tsx
I am able to call className in jsx file, but not in tsx files. Can someone assist.
The error being thrown is:
No overload matches this call.
Overload 1 of 2, '(props: ViewProps): View', gave the ...
0
votes
1
answer
444
views
Apache Echarts Change Legend how to add alternative behavior for select
I have a chart where now by default in the legend when you click on an item it disappears in the chart instead of that I want to achieve when you click on the item you see only that item in the chart ...
0
votes
0
answers
155
views
How to create the "Circle of Fifths" in HTML/CSS/JS [duplicate]
Circle of Fifths
I want to create a clickable Circle of Fifths, with proper border and background colour like the image above, but have not been able to successfully create one in HTML/CSS. I'm ...
1
vote
1
answer
35
views
image(in FormData as Blob) upload problem in webapp(react+.net)
I am developing a web app using React(TS)+.net+sqlserver.
There is a function to let user post their photos.
The problem is photos cannot be uploaded and always received by backend as null.
Below are ...
0
votes
1
answer
144
views
Video.js Player Initialization/currentTime Causes Video Not to Display in React App with Google Cloud Storage URLs
I am using Video.js to wrap Google Cloud Storage video public URLs, so that I can both skin it and control what second the video plays at (for example, play at 12 seconds)
I have the following in my ...
0
votes
0
answers
343
views
Vite React Typescript is always showing red underlines
I'm familiar with ViteReact projects because I've done dozens of them, but now I wanted to do my personal big project with Ts beacuse of the size of the project and so that it's easier for me to ...
0
votes
0
answers
65
views
Why my react project shows me 'No overload matches this call.' error only in vscode? (not in the prettier)
Here is my simple source code.
import React from 'react';
import styled from 'styled-components';
import logo from '../assets/logo.svg';
const LogoContainer = styled.div`
width: 100%;
position: ...
0
votes
1
answer
272
views
React Keycloak cant login to a client credentials getting 401
The reason why i want to use client authentication is to use the token to add users/group/roles and and most of the api functions.
I have been trying to use the ReactKeyClaokProvider from keycloak ...
0
votes
0
answers
30
views
Expressjs session cookie is not being set in react client
For some reason when I login it doesn't set cookie session for client to access content
Expressjs app setup:
const app = express();
app.use(express.urlencoded({ extended: false }));
app.use(express....
0
votes
0
answers
40
views
I don't know why useEffect runs twice. Please let me know the problem [duplicate]
I'm writing it in a react type script.
But the part that needs to be executed only once is executed twice, so we are having a problem
The first tsx file with the function you use
import React from '...
0
votes
1
answer
34
views
Incrementing Key in Simple React To Do App
I have an incrementing key in my React To Do App so I can filter out certain tasks with an id identifier. For some reason, I have to declare and define my id outside of the main function. Why can't I ...
0
votes
2
answers
2k
views
React Query Use Mutation Is Being Called Twice
So i am using react-query to do a simple post request to my api the problem I have is that the same request is being called twice. I know this because the console.log statement in the code below is ...
1
vote
2
answers
1k
views
Requesting browser permissions for camera access with React / TypeScript
I'm trying to implement a function in my React web application that allows requesting permissions from the browser to access the user's camera, similar to how Google Meet does it. The first time a ...
0
votes
1
answer
46
views
Async Methods in TypeScript React E-Commerce App: Issue with Conversation Creation and Message Sending
I'm developing a TypeScript React E-Commerce platform with Java Spring Boot and PostgreSQL. When users submit a form, it should create a Conversation with an admin and send the form as a Message ...
1
vote
0
answers
452
views
How to dynamically calculate heights of components in a VariableSizeList in React?
I'm using React with Material-UI and the react-window library's VariableSizeList component to render a list of dynamically sized components. Each component's height is determined after it has rendered,...
1
vote
2
answers
129
views
How to handle outside click in react ts
I'm using react typescript for the first time, and I implemented outside click event. I'm running into a problem where whenever i click on the active or currently selected component, it seems to ...
2
votes
1
answer
473
views
React image upload re-rendering uploaded images when adding/deleting
I have a React code that lets you add image files, preview, delete on click and add more. I'm happy with the functionality but I noticed some performance issues.
function App() {
const [...
1
vote
1
answer
1k
views
Webpack error when trying to import supabase client
i'm developing an Azure DevOps Extension and i'm very new at this kind of development. I'm using the official samples from Microsoft Github
https://github.com/microsoft/azure-devops-extension-sample/...