17. Don’t use number for indexable type key

10. When using function factories instead of classes for models/entities, leverage declaration merging by exporting both type and implementation

https://medium.com/@martin_hotell/10-typescript-pro-tips-patterns-with-or-without-react-5799488d6680

1. Don’t use public accessor within classes

don't

do

Why?

클래스 내의 모든 멤버는 기본적으로 public 이 적용됩니다.

2. Don’t use private accessor within Component class

don't

do

Why?

TS의 private 접근자는 런타임 동안에 동작하지 않습니다. 그것은 단지 TypeScript 컴파일 환경에서만 보호할 뿐입니다.

그리고 실제로 리액트 컴포넌트 인스턴스를 직접 사용하거나 클래스 프로퍼티에 접근할 필요가 거의 없습니다.