Category "reactjs"

Vite - change static assets' directoy

I had build an app using create-react-app. And our server is set up as such that all files except index.html are in a folder named static. <!DOCTYPE html>

Type argument at moment of use

I'm trying to build a generic tool for handling the response to React Query useQuery requests in my app, and build this out using TypeScript, so that the data i

Axios API request from React Native frontend to local spring backend service not working

I develop a React Native mobile app and for the backend I want to use Java Spring. Now I have a standalone backend server running locally on port 8080 and my re

How can i hide long description and making it toggle in react js?

I face a problem. my reactjs application has some card items and has some descriptions here. Here I want to make it a short description and a button, and when I

React JS useParams

I am trying to display the content for each page using useParams , but it doesn't work. I will put some screenshots below with the components. Every single obje

useEffect is not called when dependencies change

import React, { useState, useEffect, useRef } from "react"; import ReactDOM from "react-dom"; import "./styles.css"; function App() { const [minus, setMinus

"No routes matched location" error in React

I am creating a React app which can be used to manage company events. There are two components related to events that aren't working at the moment. These are th

How to get the returned data from a smart contract function using ethers.js?

I'm trying to consume a function from a smart contract using ethers.js. The function retrieve the info of a user logged before (with the help of other function)

GraphQL: unexpected variables in variableValues: first when using no variables in args

My GraphQL Query works just fine in Hasura Client but fails to work when I use the query in my React code using Apollo, I don't understand why because I am not

Import web3 not found... in solana web3.js

I npm installed everything, yet only web3 is not working? Is this a bug or is there an alternative to this solution? import React,{useEffect, useState}from 're

Import.meta.env undefined on production build vitejs

I am using vitejs to compile my react app statically, however after build .env imports become undefined which is not the case on development stage. reading the

React unsubscribe from RxJS subscription in useEffect

A quick question regarding RxJS in useEffect hooks I've noticed the React community uses this unsubscribe pattern with RxJS: useEffect(()=>{ const sub = in

How to rotate material-ui icon

I'm trying to rotate material-ui icon using css property animation but not getting the desired result. Can somebody please help me identify what's going wrong h

(Gatsby) How to pass image source as a prop in MDX component

I'm trying to create a Figure component in which I pass the img src along with other data. I realize it's not straightforward—e.g., this thread—but

How to clear a React Bootstrap textarea form control after the form is submitted?

I have a form made with React Bootstrap to semply submit a string that will be saved on a DB. It works and the submitted message is saved, but I don't know how

React Native Components Override styles "leaking"

I'm trying to build my own component library specific to my React Native app using the Atomic Design Methodology, so I have small components like Paragraph, Tit

react conflit package.json

ERROR in Plugin "react" was conflicted between "package.json » eslint-config-react-app » D:\Projets\Roster's\Client\node_modules\eslint-config-reac

React Module Parse Failed – react-map-gl

I am currently trying to make a typescript app on expo using the react-map-gl package. I currently am trying to load the basic example code snippet they have. I

Material UI Dialog not working in production - shows a blank page

I've installed serve and have run npm run build. When I start the application everything's working except the dialogs i.e. when I open them I get a blank white

Access-Control-Allow-Origin is added to the header when request is made from Python(Google Colab), but not when the request is made from ReactJS

My app is structured as follows: React frontend -> Azure Api Management -> Flask backend. The Flask app allows all origins. app = Flask(__name__) CORS(app