inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

React Hook useEffect has a missing dependency:

434

kwonggisung

작성한 질문수 1

0

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요!
- 먼저 유사한 질문이 있었는지 검색해보세요.
- 서로 예의를 지키며 존중하는 문화를 만들어가요.
- 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세

import React, { useEffect } from "react";
import axios from "../api/axios";
import "./Row.css";



export default function Row({isLargeLow, title, id, fetchUrl}) {


useEffect(() => {
  fetchMovieData();

 
}, [])
const fetchMovieData = async () => {
  const request = await axios.get(fetchUrl)
  console.log("requeset",request)
}


  return (
    <div>Row</div>
  )
}

Compiled with warnings.

 

[eslint]

src\components\Row.js

  Line 15:4:  React Hook useEffect has a missing dependency: 'fetchMovieData'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

 

Search for the keywords to learn more about each warning.

To ignore, add // eslint-disable-next-line to the line before.

 

WARNING in [eslint]

src\components\Row.js

  Line 15:4:  React Hook useEffect has a missing dependency: 'fetchMovieData'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

 

webpack compiled with 1 warning

 

이런식으로 계속 ueseffect 의존성 오류가 나오는데 ㅜㅜ 강의랑 똑같이해도 진행이 안되네요ㅠㅠㅠㅠㅠㅠ

useEffect

답변 0

onSnapshot 함수 unsubscribe 에 대해서 질문이 있습니다

0

387

1

useEffect에서 변수 업데이트 관련 질문

0

381

1

기본적으로 App이 두번 렌더링 되는 이유는 무엇인가요?

1

460

1

React Hook useEffect has a missing dependency

1

663

1

useEffect 2번 실행되는 이유

2

986

3

Mount가 두번 실행되는건 왜 그럴까요?

1

3102

1

안녕하세요

0

228

1

카트 목록 삭제시 문의드립니다.

0

359

2

useEffect 실전 활용법(1) 강의에서 질문있습니다.

0

338

1

useEffect를 왜 사용하시는 건가요??

0

299

1

useEffect의 deps에 함수가 들어가는 의미, 그리고 뒷정리 함수에 대한 질문

3

1380

2

useEffect, useRef이 디테일한 역할이 무었인지 궁금합니다

0

422

1