react notfound1 React-router - NotFound (Switch) ReactJS - NotFound (Switch)react-router v4 version4sorce code는 이전 문서에서 재활용한다./...../ 는 생략되었다는 표시임파란 글씨는 추가된 것임빨간 글씨는 수정된 것임 요청하는 페이지가 존재하지 않을 경우 보여질 페이지 Switch문은 차례대로 비교하여 최종적으로 찾는 페이지가 없을 경우 NotFound 페이지를 보여줌. ~cra-router/src/routes$ NotFound.jsimport React from 'react'; const NotFound = () => { return ( 존재하지 않는 페이지입니다. 404 );}; export default NotFound; ~cra-router/src/ App.jsimport React from .. 2018. 4. 11. 이전 1 다음