• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    해결됨

질문있습니다!

20.06.24 02:18 작성 조회수 110

0

안녕하세요 강사님.

강의 잘 듣고 있습니다.

22강 강의에서 터미널 client에서 npm run start 실행할 때

Compiled with warnings.

Warning in ./src/App.js

C:\Users\admin\Documents\boilerplate\client\src\App.js

  6:3  warning  'Link' is defined but never used  no-unused-vars

✖ 1 problem (0 errors, 1 warning)

You may use special comments to disable some warnings.

Use // eslint-disable-next-line to ignore the next line.

Use /* eslint-disable */ to ignore all warnings in a file.

위와 같은 에러가 발생합니다.

해결 방법 좀 알려 주시면 감사하겠습니다.

혹시나 자료가 부족할까 봐 제 깃허브 주소도 첨부하겠습니다.

https://github.com/rjsehd563/boiler-plate-ko

답변 1

답변을 작성해보세요.

1

아 이부분은  에러라기 보다는 경고문구를 주는건데요 ^^ 

import {
BrowserRouter as Router,
Switch,
Route,
Link
} from "react-router-dom";


여기 이렇게 import를 해왔는데  실질적으로  Link를 한번도 사용하지 않았기에 

필요없는 걸 import 해왔다고 경고를 주는거에요 ~ ! 
그래서 만약 필요없다면  

import {
BrowserRouter as Router,
Switch,
Route
} from "react-router-dom";

이렇게 Link를 없애주시면 됩니다 ^^ 수고하세요 ~