Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
1 answer
26 views

The input in searchbar disappears when i click on any other space/part of the browser of when i click tab button

import React, { useState, useEffect, useRef } from "react"; import { useNavigate } from "react-router-dom"; import axios from "axios"; import Autocomplete from "@mui/...
ismail sakhani's user avatar
0 votes
0 answers
14 views

How can I fix react hooks in a React SSR project?

I try to migrate an existing project in js using express and ejs to render templates. I used react and react-dom. But the issues are that hooks and onChange don't work. I'm going to share the client ...
Jorge Contreras's user avatar
0 votes
0 answers
14 views

Minified React error #321 on Lazy Loaded Components

I have a react.js app which is added to our clients' websites as a widget. The clients' websites can be built on any tool e.g. wordress / angular / react etc. We've two types of widgets search and ...
Ali Raza Sherazi's user avatar
0 votes
1 answer
65 views

Why is the first line in useEffect ignored

using socket.io and whenever a signal is received from the client and useeffect is invoked the first console log is ignored and only the second one runs import { socket } from "../socket.js" ...
Brian's user avatar
  • 21
0 votes
0 answers
23 views

How to fix React Hook useEffect has a missing dependency: 'fetchData' [duplicate]

I am currently using useEffect and I get this error below "WARNING in src\newComponents\jobSearch\UseFetch.js Line 36:8: React Hook useEffect has a missing dependency: 'fetchData'. Either ...
Abratemmy's user avatar
0 votes
2 answers
36 views

How to I select the records only when I click on the button?

I am using Airtable blocks to create an extension. I have a button that, when pressed, should retrieve the records. However, I am not able to get it to run when the button is clicked...only when the ...
Temp Account's user avatar
2 votes
1 answer
42 views

React "Invalid Hook Call" error when I use useNavigation

Photo of Error Message I created a Product Card in React, and in the product card, I want the user to be able to press it and navigate to another Product Detail Screen. Now, every time I initialize ...
Muhammad Daniyal Arab's user avatar
-4 votes
0 answers
34 views

Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. React [closed]

In my code is showing an error and I don't know why. import React, { useState } from 'react'; import { auth } from '../firebase.config'; import { signInWithEmailAndPassword } from 'firebase/auth'; ...
Éric Favero's user avatar
0 votes
0 answers
16 views

Tanstack react table managing globalFilter in URL in stead of state

I am using Tanstack react table in my NextJS application. I have implemented a search field with globalFilter, worked fine. I want to manage the state in the URL in stead of the state so search ...
Santi's user avatar
  • 340
-2 votes
0 answers
19 views

React native ecg charts [closed]

For my React Native project, I need to implement an ECG chart. I have already tried several libraries, including svg-charts, react-native-charts-wrapper, react-native-chart-kit, react-native-...
Sourav Singh's user avatar
0 votes
2 answers
42 views

ReactJS - Resetting a timeout in progress and reactivating from the same button press

I have a button that has a callback function. I want the button to start a timeout with a 5 second delay when clicked. If the button is clicked again within that 5 seconds, I want the timeout to ...
user279043's user avatar
-1 votes
0 answers
21 views

NextJS - useEffect refreshes and re-renders again to default [duplicate]

I am trying to build a dashboard and using the Shadcn and nextjs example. Here is my code for the app/dashboard/positions/page.tsx 'use client'; import... const breadcrumbItems = [ { title: '...
Vivian Lobo's user avatar
-1 votes
1 answer
56 views

how to execute requests one by one in a useEffect

I have useEffect that executes the request when changing dependences (department and two dates field). useEffect(() => { getFilteredRestReport({ date_start: formatDatePatchPoint(date[0]), ...
Smokeguap's user avatar
0 votes
1 answer
46 views

can i use context inside custom hook?

below is the custom hook. I am trying to use context inside it. It throws the error "Invalid hook call. Hooks can only be called inside of the body of a function component" export const ...
Ajith's user avatar
  • 9
0 votes
0 answers
49 views

Force React to rerender between processing simultaneous mouse events

Here is a basic example of the issue. A component contains two nested divs. We can keep track of the "depth" of the mouse position (0 if outside both divs, 1 if inside the outer div but ...
Arthur F.'s user avatar
  • 298

15 30 50 per page
1
2 3 4 5
1058