개발공부/기타
-
ContextAPI와 Recoil개발공부/기타 2024. 1. 15. 16:47
지금 지인들과 진행하고 있는 사이드 프로젝트가 하나있다. 처음에는 관리해야 할 데이터가 별로 없어서 ContextAPI를 사용했는데, 시간이 지날수록 불편한 점들이 있어서 팀원들과 논의한 결과 Recoil을 사용하기로 결정했다! :) 변경한 이유는? ContextAPI를 불편하게 생각했던 이유는 아래와 같다. 코드 간결성 및 가독성 불필요한 리렌더링 발생 코드 간결성 및 가독성 ContextAPI에 로그인 유무를 저장한 변수가 있었는데 분명 boolean으로 저장했는데 console에 찍으면 int이 찍혀있는 것이었다. 디버깅을 통해 원인을 파악해보니 팀원 중 한명이 코드를 잘못 작성해서 int형으로 데이터가 잘못들어갔던 것이다. (주석 참고) export const AuthProvider = ({ ch..
-
Styled Components와 Tailwind CSS개발공부/기타 2024. 1. 10. 22:24
최근에 진행했던 프로젝트 2가지가 있는데 하나는 스타일드 컴포넌트로, 하나는 테일윈드 CSS로 작업했었다. 이 내용들을 포트폴리오에 녹여내던 중 '내가 이 두 가지를 정확히 이해하고 사용하고 있는가..?' 라는 생각이 문뜩 들었다. 둘 다 처음에 배워두면 좋다고 해서 사용하는 방식만 공부했지, 이해하고 사용하고 있지 않다는 사실을 깨닫게 되었다. 그래서 오늘은 Styled Components와 Tailwind CSS에 대해 자세히 알아보고자 한다! CSS란? 우선 두 가지를 공부하기 전 가장 기초인 CSS가 뭔지부터 찾아봤다. 웹 페이지의 레이아웃 및 스타일을 정의하는 스타일 시트 언어 즉, 웹 페이지의 시각적 요소를 담당 위 내용을 읽어보면 CSS는 웹 페이지에서 굉장히 중요한 부분이라는 것을 알 수 ..
-
HTTP 에러개발공부/기타 2024. 1. 5. 10:10
오늘은 HTTP 에러에 대해 공부하고자 한다. 요즘 지인들과 프로젝트 진행중인데 HTTP 에러의 원인이 헷갈리는 경우가 있어 한번 정리해보면 좋을 거 같아 이렇게 글을 쓴다. 다른 사람들도 같이 숙지해서 프로젝트를 원활하게 진행했으면 좋겠다! :) HTTP 에러 클라이언트와 서버 간 통신 중에 발생하는 문제를 나타낸다. 이제 종류 별로 하나씩 정리해보자! 100번대 요청이 받아들여졌거나 진행중 100 (Continue): 클라이언트가 요청 본문을 계속 전송해도 좋음을 나타냄 200번대 요청이 성공적으로 처리됨 (Success) 200 (OK): 요청이 성공적으로 처리 201 (Created): 새로운 리소스가 성공적으로 생성 204 (No Content): 요청은 성공적으로 처리되었지만 응답 본문이 없음..