cjd1110 / GGGL

1 stars 0 forks source link

(common) lazyloading 구조에 맞게 ngrx store 구조 리팩토링 #26

Open cjd1110 opened 5 years ago

cjd1110 commented 5 years ago

현재 상황

분석 상황

해결 후 결과

cjd1110 commented 5 years ago

기획중인 디렉토리 구조

9a4ec5b1-b239-4a3b-b124-7b1dd0e57960

cjd1110 commented 5 years ago
cjd1110 commented 5 years ago

@ngrx/schematic를 활용하여 ngrx store 기능을 구현한다.

테스트

실행 명령어

$ ng generate store State --root --module app.module.ts

결과

image

실행 명령어

$ ng generate effect Post --root --module app.module.ts

결과

image

실행 명령어

$ ng generate entity Post --root reducers/index.ts -m app.module.ts

결과

image

cjd1110 commented 5 years ago

rxjs 공부 후 시작 예정

cjd1110 commented 5 years ago

ngxs vs ngrx?

출처 : https://www.reddit.com/r/Angular2/comments/8x71fk/ngrx_or_ngxs/ https://blog.singular.uk/why-i-prefer-ngxs-over-ngrx-df727cd868b5

계획: rxjs 공부가 마무리 되는 시점에 ngrx 또는 ngxs를 사용예정 더 많은 정보 조사를 하여 프로젝트를 개발 및 유지보수하는데 더 편리한 라이브러리를 사용할 예정

의견: 아직 더 많은 정보를 조사해야 되는데 코딩을 더 angular 스럽게 작성할 수 있는 ngxs가 끌리긴하다..

cjd1110 commented 5 years ago

ngxs 공식 Angular sample 코드 - Angular lazyLoading 에 맞게 짜여져 있음 https://github.com/ngxs/store/tree/master/integration/app

cjd1110 commented 5 years ago

ngxs 사용 결정