error:‘React Hook useEffect has a missing dependency:’

react报错
需要忽略这个警告吗?

src\page\home\deviceList\deviceList.jsx
  Line 94:6:  React Hook useEffect has a missing dependency: 'getgatewaydevice'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

src\page\home\gatewayConfig\gatewayConfig.jsx
  Line 35:6:  React Hook useEffect has a missing dependency: 'props.history'. Either include it or remove the dependency array  react-hooks/exhaustive-deps


src\page\home\gatewayInfo\gatewayInfo.jsx
  Line 70:17:  Assignments to the 'setTime' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect  react-hooks/exhaustive-deps
  Line 80:6:   React Hook useEffect has a missing dependency: 'history'. Either include it or remove the dependency array                                                                                                                                                                                react-hooks/exhaustive-deps

src\page\home\gatewayInfo\upgrade\upgrade.tsx
  Line 27:6:  React Hook useEffect has a missing dependency: 'show'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

src\page\home\home.jsx
  Line 89:5:  React Hook useEffect has a missing dependency: 'props'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
阅读 5.2k
1 个回答
推荐问题