05:00마크업 상에서 아래 쪽에 위치하면 위로 올라갑니다.
*negative margin과 상관없는 이야기
05:51negative margin은 시작점이 더 빨라지거나 끝나는 지점이 더 빨라지는 개념
*margin-left, margin-top에 negative margin은 시작점이 빨라지는 것
*margin-right, margin-bottom에 negative margin은 끝나는 지점이 더 빨라지는 것
06:47카드가 겹쳐있는 디자인은 negative margin이 적합(position: absolute로는 까다로운 문제 존재)
*position: absolute를 사용하기에 앞서 negative margin으로 해결할 수 있는지 고민해봅니다.
08:08header의 margin-bottom에 negative margin 적용하니 본문 글이 header 위로 올라오는 모습
*끝나는 지점이 빨라졌기 때문에 이런 현상 발생
해당 학습노트에서는 react router 버전6에서 redirect를 어떻게 구현하는지 소개합니다.
공식 문서: https://reactrouter.com/
00:50
react router 버전5에서 redirect를 구현하는 방법입니다.
*예상 시나리오: pathname이 '/redirect'인 page 접근 시 pathname '/about'인 page로 전환됨
*특정 pathname에 redirect 로직을 등록하는 이유는 가지각색이겠지만 그 중 대표적인 용도는 로그인 여부 검사입니다. 서비스를 이용하는 유저가 로그인을 했을 경우 특정 pathname에 접근하지 못하도록 사용하는 것이죠.