TIL-220512

지원·2022년 5월 12일
0

Creat React App에서 환경변수 관리

  • dotenv 기반으로 환경변수 사용 (dotenv는 CRA에 기본적으로 포함)
  • .env에서 REACT_APP_prefix 붙인 변수를 읽을 수 있음
  • js에서는 process.env.NAME 형식으로, html에서는 %NAME% 사용 가능
  • 환경변수 재설정시 서버 재시작 필요
  • References

Intersection Observer API

  • A way of to asynchronously observe changes in the intersection of target elment with an ancestor element or with a top-level document’s viewport.
  • IntersectionObserver interface
    • constructor(callback[, options])
      • callback: (entreis: [IntersectionObserverEntry](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry), observer: IntersectionObserver) ⇒ void
      • options
        • root: ancestor element or document 지정
        • rootMargin: CSS margin property와 유사하게 지정
        • trheshold: number | number[]
  • References

Flux 아키텍처

Concurrent React

Recoil

React Folder Structures

**프론트엔드 개발자라면 반드시 알아두어야 할 32가지의 UI 요소 (번역)**

Code Splitting | Create React App

Cross Browsing(크로스 브라우징)

Accessibility

Axios / SWR

Design patterns

Javascript

  • ReplaceAll
    • 첫 번째 인자로 정규표현식이 올 때는 반드시 global regex여야 한다. (아닐 경우 TypeError)

syncyarnlock

  • yarn upgrade를 하면 yarn.lock만 변경되고 package.json에 반영되지 않음
  • syncyarnlock 라이브러리로 sync
    • sudo yarn global add syncyarnlock
    • syncyarnlock -s -k

Misc

profile
섬마을 초보 개발자

0개의 댓글