Category "reactjs"

React App: Cannot find module 'react-dom/client' or its corresponding type declarations

I'm currently experiencing this error and I'm not really sure how to fix it. I've been trying to merge a project with components stored in bit.dev. import React

React - How to avoid object getting same key? - Todo

I'm working on a todo app. The problem is: when I add two todos for example, first one gets id 0 and the other one gets id 1 (this is from todo.length), if I re

TypeScript & React: What's the difference between 'React.HTMLProps<T>' and 'JSX.IntrinsicElements["T"]'

I am looking for the most "canonical" and/or "up-to-date" way to add a set of default HTML attributes as a set of allowed TypeScript props to a customized, "enh

How can I check the TextInput change completed in react native

Basically, I need to hit search API when the text changed but it's not a good thing to call API on every change in TextInput. So, is there any callback function

How can I pass in an unknown amount of objects in a dynamic react form to my sql database?

I'm having trouble connecting 0-6 dynamically rendered form elements to the backend/database using react. Perhaps the way I'm attempting to do this is not suppo

Should I use useImperativeHandle hook when needing multiple refs

I am building component(ThePieChart) where I need to perform quite a bit of DOM manipulation on its elements. Those manipulations I need to perform in parent co

Latest version of iOS Chrome not downloading blobs correctly (pdf)

The below code samples works with: Chrome Android Chrom Windows Safari iPhone Safari Mac Chrome Mac Doesn't work with: Chrome iPhone Sample 1 var oReq = new XML

Is there a way to determine the current font-size of a DOM element in ReactJS?

In our app, a piece of text changes font-size using a CSS class with responsive breakpoints. But some users want fine-tooth control over the font-size, so we ha

REACT JS FIREBASE FIRESTORE- how can i update my field in a document?

here is my manageexam.jsx file this is where the update happen when i click the manage button on the table. i want to update a specific document id (3BelYq7lMxR

How to measure the height of a child and pass it to a parent in React?

I want to calculate the height of a component and send it to its parent when the page is loaded and resized. I'm using the below reusable Hook to successfully m

React pass multiple properties and children

I'm new to React, typescript and nextjs and I'm trying to pass multiple properties to a component. But, I seem to override them. For example I have this in my _

Integrate Phaser Game with React as component

I'm new to React, I want to make a component for my phaser game to insert it into a react project. My Game component: import React, { Component } from 'react' i

Use of Maps Chart from Ant Design

I'm using ANT DESIGN CHARTS on an example project in React. I try to add two differents types of charts a line chart and a map chart for the moment only a copy

Keycloak - React.js cannot call API

I have a simple React.js application. I want to test if it can call an endpoint from my API. Both my API and React.js application are using Keycloak for Authent

I can't solve the dependency tree every time i try to install @craco/craco

Unable to solve dependency tree trying to install tailwind. This is my package.json: { "name": "front-end", "version": "0.1.0", "private": true, "devDep

Not able to Initialize Firebase APP inside script module in HTML

I am working on a minimal (proof of concept) project with Preact and Firebase. A single HTML file, bundler/transpiler free thanks to HTM as JSX replacement. Her

FieldRenderProps with React Native TextInput

I created custom TextInput for final-form in React-Native. And I need to specify type for FieldRenderProps. And I have an error: TS2769: No overload matches thi

I get a problem with use dotenv with react in typescript or .tsx files

I tried to use import * as dotenv from 'dotenv' and import { config } from 'dotenv' and restart the server many tames else I tried that dotenv.config({ path: __

Coordinate overlapping components to scale together

Attempting to create a higher-order component with two components that scale together. The higher-order component is set up as so: <> <Component 1/

How do I update a record using the put API?

As you can see in the React Js code I am trying the Reduce one by one quantity when clicking the Delivered button. When the Click Delivered button quantity bec