Category "reactjs"

Why is my useEffect not being called when I take a item out of my cart in React?

I am doing a simple food ordering web app with React and for some reason, I can't get my useEffect to run when the cart is changed with the X button to delete a

Unable to run unique iterations for individual objects

I'm trying to present 25 entries (name, company, skill, etc.) on the page and am having trouble getting the unique information. i.e. I only see the first entry

Dynamically add circles to react leaflet with blockchain

I have read this post which partly answers my question, but my problem is the infinite loop that the provider.on method creates with setData(_data). I simply wa

React useEffect Dependecy releated Problem

In React I have used useEffect to fetch data. But I have confusion when I have to mention the dependency and when I have to keep it empty

How we can update the state of button to logout after successfull login in react redux

Here after successfull login im redirecting to homepage. How i can change that button to logout and when i again click on that logout button how can i again cha

Routing to a page when the id needed is not contained within the current page

I'm working on a project where I have returns and orders. My returns are stored as arrays with information such as _id, orderId, orderItems, etc. In my project,

How to play sounds correctly?

I need to run sounds automatically in React. In order to run sounds, I use a non-standard useSound hook. It creates a button and by clicking on this button the

How to pass id in path url as component property in react router v6 [duplicate]

I'm updating an outdated tutorial project using react hooks and react router v6. I want to pass the id in the path url to the component proper

how to handle lazy import in functional component react js avoid import befor need to render

Get data from multiple form it causes load more and become slow. How to avoid import or run code before render the element. Here the below code run both element

React get request query string react-router-dom v6

querystringuseparams https://i.stack.imgur.com/1q2cK.png Hi React 17.0.2 and react-router-dom v6 using my project. top image look. What I want to do is write th

ReactJs onClick function not working in bootstrap4 modal

hi I have imported bootstrap sources like this in my React project index.html file: <script src="%PUBLIC_URL%/assets/js/jquery.min.js"></script> <

How to login with github oauth for react app

How do I login with github oauth in my react project. Is there a sample project for this? After logging in, I need to see the user's repos.

I am trying to connect and read data from mysql in node js and react project with clinet and server setup but

**I am trying to connect and read data from MySQL database in node js and react project with client and server setup but unable to get success, here is the code

TypeScript. The function accepts two different objects, but returns one object

I am beginner in TypeScript. I am developing a home project - a weather application, I have two requests to the server, the responses are almost identical, exce

Where is the breakpoint code located in the React export from Anima?

I followed the steps to add breakpoints using Anima's Figma plugin and SHIFT-selecting the three desktop, tablet, and mobile frames. Then I clicked "save" and s

Refactoring tabs according to react best practices

Here is a FAQ component with a child Accordion. As identifier I use anchor that I get from data, written for every element as tab1, tab2, tab3 etc. (instead of

TypeError: cleanUrl is not a function while creating a React Project

Hey everybody I am getting this error after hosting a website on firebase or I am not sure about it. It's the replace-info.js screenshot. I am not able to fi

How should I design my application to handle large amounts of data?

I am building an application for building sports betting models. Basically users can create their own criteria and backtest their models across historical data.

React - Set state object using args

I have an object saved in a state I am trying to create a function to update parts of the object. function removeError(val) { setPersonsState((prevState) =&

Get error when using createContext with typescript

I am trying to make a context with hooks in react with typescript like this: // StateGlobalContext.ts import React, { Dispatch, ReactNode, SetStateAction } from