분류 전체보기
-
[항해 99 주특기] 인증 / 인가 (쿠키 && 세션)개발일지/항해 99 2023. 7. 12. 21:40
인증 / 인가 인증이란 서비스를 이용하려는 유저가 등록된 회원인지를 확인하는 절차 인가란 특정 리소스에 접근할 권한이 유저에게 있는지 확인하는 절차 클라이언트가 서버에게 인증을 요청을 하고 서버는 클라이언트에게 인가를 해주는 것이 기본개념 http프로토콜 통신의 특징 무상태 서버와 클라이언트 사이에 상태가 없다는 뜻 클라이언트가 서버에 요청을 하고 응답을 받는 사이클이 한번 지나고 나면 서버는 클라이언트에 상태에 대해서 어떠한 정보도 가지고 있지 않는다 (기억하지 않는다.) 이후 클라이언트가 새로운 요청을 보내면 서버는 항상 새롭게 생각하며 응답한다. 서버는 클라이언트의 상태를 별도로 기억할 필요가 없이 요청대로 항상 응답한다. 이러한 특성은 동일한 서버를 여러개로 확장시킬 수 있다(scale-out) ..
-
[React] ReactQuery에 대해서 좀 더 알아보자프로그래밍/React 2023. 7. 12. 11:07
사용이유 ReactQuery를 왜 써야하는가를 알고 사용을 하자! 1. Store를 좀 더 효율적으로 관리를 해보자 redux를 이용해서 비동기 통신의 데이터를 처리하다보니 store의 크기가 점점 커지게 됨에 따라서 원래 기능인 전역관리와 비동기통신을 구분해줘야겠다는 생각으로 사용하면 된다. 2. boiler plate의 감소 기존의 비동기 통신에서 try catch문을 통해서 ErrorHandling을 했더라면 ReactQuery를 사용하면 좀 더 쉽고 boiler plate를 감소하면서 비동기통신데이터에 대한 관리를 전담해서 할 수 있다. https://abangpa1ace.tistory.com/entry/%EC%9E%91%EC%84%B1%EC%A4%91React-Query-2-Queries%EC%..
-
[React] Portal 사용해서 Modal 만들어보기프로그래밍/React 2023. 7. 11. 16:24
원리 Portal의 사용 원리에 대해서 간단하게 설명하자면 1. index.html에 나타나는 우리 root 와 동일선상에 portal에서 사용할 공간을 생성해 준다 2. portal component를 생성해서 로직을 작성한다. getElementById를 통헤서 root옆에 만들어 주었던 공간을 가져오고 createPoral을 이용해서 연결을 해준다 createPortal( 끄기 , document.getElementById("modal") ) 3. creatPortal의 인자값으로 첫번째는 불러올 Modal을 넣고 두번째는 이동할 위치인 element를 넣는다 주의사항 포탈을 이용해서 root 옆으로 불러오긴했지만 z-index값을 적용한 DOM요소(?)보다 상위에 위치하지 않기때문에 z-index..
-
[level4 1일차] 뭔가 엄청 이상한데개발일지/항해 99 2023. 7. 10. 00:36
오늘 이제 level 4 를 혼자서 시작을 해보았다. 아직 Css도 제대로 꾸미지 못했는데 막히는 부분이 너무 많이 생겨서 문제다 4시간 좀 넘게 진행을 했는데도 한게 전혀 없는것만 같은 느낌이다 그래도 뭔가 남겨야겠다고 생각이 들었다 오늘 한 내용 fontawsome을 이용해서 icon을 추가하려했지만 이상한 에러가 떠서 이건 나중에 물어보려고한다 style-reset을 이용해서 css 리셋을 시킬 수있다는 사실을 알아냈다 조금씩 Css를 스스로 적용해보고 있다 doc의 구조를 짜면서 현재는 Router와 components 그리고 layout 부분까지 하고 있다 vite를 사용해서 하고있는데 yarn을 써서 하니깐 package에 API가 잘 안깔리는 것 같다 그래서 vite를 쓸때는 걍 npm을 사..