Questions tagged [react-tsx]

A TypeScript XML syntax transform recommended for use with React.

TSX is an embeddable XML-like syntax. It is meant to be transformed into valid JavaScript, though the semantics of that transformation are implementation-specific. TSX rose to popularity with the React framework, but has since seen other implementations as well. TypeScript supports embedding, type checking, and compiling TSX directly to JavaScript.

563 questions
1
vote
0 answers

Add a new row with a select field as a cell

I am using DataGrid from the MUI library. I have a table with four cells (id: number, processPath: SelectField, associateLogin: TextFields, action: Button). I have also added functionality to add and remove rows on button click. The issue I am…
PandasM
  • 11
  • 2
1
vote
1 answer

A way to display small text below an icon with onMouseOver

I'm using react and I want to make a onMouseOver in order to display a small text onMouseOver={(e) => { alert('Set to started'); }} I've tried this action but it makes a HTML alert on top. I just want a small text. I cant seem to find something that…
1
vote
2 answers

Formik onChange() field hook overrides the displayed value & selection mechanism

I have a Field in a Formik which needs a dynamic validation Schema: When a user selects a payment token, the minimum payment value must be dynamically changed for another input field. I used a state value and the "onChange" listener from the Field,…
quent043
  • 15
  • 3
1
vote
1 answer

How to fix HTTP 404 on my Github Pages? How I can run my application with more folders in my repository?

I am trying to see my React + Vite's project using github actions but I'm receiving this error: 404 Error Image This is my repository: Folders in my repository My React's project is on web folder and I put in package.json the "homepage":…
1
vote
1 answer

Target requires 1 element(s) but source may have fewer

I am trying to create a form in react with typescript. I want to create an array of objects through the form. Here is the interface. interface FormValues { featureList: [ { featureName: string, deliverables:…
1
vote
0 answers

Docusaurus failed to build on Linux

Can be successfully built in Windows, but not in Linux. I'm using docusaurus 2.3.1 Environment in Windows: Windows 10 node v16.17.0 npm 9.3.0 yarn 1.22.19 Environment in Linux: Centos 7.9.2009 node v16.18.0 npm 9.4.1 yarn 1.22.19 Code of the…
Jerry
  • 11
  • 3
1
vote
1 answer

Framer-motion: Fire onTap() when click the other button

I have RotatingButton which is turning and changing scale when clicked. (Rotating has to be slower so I used two motions and added duration to rotate.) Button is adding +1 to state. ( addValue() )
Werthis
  • 557
  • 3
  • 15
1
vote
1 answer

Why it shows box inside a box when add multiline in react mui textfield and how to remove the inner box

I want to create a textfield using react mui textfield. But when I add the multiline prop it gives two boxes with border. how to remove the inner box margin I tried several css and styling options but didn't work
Yasas Test
  • 11
  • 1
1
vote
0 answers

Error: Uncaught [TypeError: createKeccakHash is not a function]

I am trying to use web3js external calls in jest test. Previously i was able to get data, but the error thrown was can not console response after the end of test something like this, although i was able to see the response but in catch block. But…
1
vote
0 answers

The system cannot find the path specified. node:internal/modules/cjs/loader:998

I'm new to web development and nodejs stuffs. I tried to create a react typescript app with vite & tailwindcss install. But I got this error when I run npm create vite@latest cd to project npm install npm run dev The system cannot find the path…
Torukun
  • 33
  • 4
1
vote
0 answers

How to properly implement the list component?

I'm trying to write a simple react client that will send a message to the server and receive back a list of all items. I want to output a list of all the items, but something goes wrong import React, {Component, ReactNode} from "react"; import…
student422
  • 145
  • 7
1
vote
2 answers

Using a string as a component name in react and typescript

I have an input component that can either render a textarea component (from a library) or a regular input. This is the component: import React, { useEffect, useRef, useState } from 'react' import './AppInput.css' interface Props { placeholder:…
User123123
  • 485
  • 1
  • 5
  • 13
1
vote
1 answer

Cannot read properties of undefined in react using redux

I am getting this error when trying to display comments of specific posts. Uncaught TypeError: Cannot read properties of undefined (reading 'from') In my parent component I fixed it with calling dispatch, but here it does not work. Parent…
povodnikt
  • 27
  • 7
1
vote
3 answers

can we render div reference stored in useRef variable in ReactJs

actually i am trying to create a popup which allow user to see expanded view inside the popup when user click on expand view for the particular element there are series of more then one element Requirment:-the issue is that there are multiple…
1
vote
1 answer

React Typescript parsing formData in required format

I'm new to React and Typescript and I have an editable table with the below default values which can be updated(edited) and submitted. This is the original and expected data format (parameters), the parameters fields and values are tied w.r.t to the…