[원티드프리온보딩] 220516

김듑듑·2022년 5월 16일
0

TIL

목록 보기
14/33

깨알정리

  1. axios는 promise 리턴이라 async/await가 필요없다 그리구 axios(구구절절)보다 axios.get()써라
  2. 외부모듈(상단) - 내부모듈(하단)순으로 import 해오자
  3. git은 소문자, 대문자를 무시하니까 조심하자 설정을 하던가 git config core.ignorecase false
  4. create-react-app을 쓰면 auto-prefix가 css에서 브라우저별 접두사 안넣어줘도 된다 알아서 넣어준다 https://github.com/postcss/autoprefixer
    https://velog.io/@hanei100/Parcel-autoprefixer
  5. setloading 넣을때 async await 쓰지말고 finally 쓰자
    그리고 loading processing은 suspense
  6. 리턴이 없으면 forEach를 쓰자
  7. map/forEach/push가 있다면 reduce 메서드를 쓸 수 있다
  8. api 요청할때 try catch finally 쓰자 (try-catch 끝나면 항상 실행되는 블록)
  9. !lengthㄴㄴlength===0을 쓰자
  10. 조건부 렌더링 논리 && 연산자로 if를 인라인으로 표현하자
    {errorMSG && <span>{errorMSG}</span>}
  11. item delete할때 filter 써서하자
  12. @forward
    https://youtu.be/CR-a8upNjJ0
  13. 주소에 query string을 추가해주자
  14. context API 쏘 지저분쓰
    https://react.vlpt.us/basic/22-context-dispatch.html
  15. 무한스크롤 react-intersection-observer안쓰고 하단에 div 박아서 구현하는 법 (inView 👉 true/false)
    const [ref, inView] = useInView() return(<div ref={ref} />)
  16. Route에서 root에 / 빼고 나머지엔 이름만
  17. modal만들때 portal
    https://ko.reactjs.org/docs/portals.html

외면했던 애들

redux-toolkit
redux
recoil + react-query
외면했던 쓰로틀링 디바운스


당장 공부하는 중

아직도 적는중이라 아무도 보진 않겠지만 클릭하고 낚이지말자
https://velog.io/@rlaebqebq/리액트-쿼리가-뭘까


대상포진 두번걸릴수 있나싶음 이거 대상포진각인데....인생아....

0개의 댓글