Open eddiejaoude opened 5 years ago
Suggestion | Reason | Link to docs | Current usage | Proposed usage |
---|---|---|---|---|
change subscribe to async pipe in components; rename observable variable with suffix $ | auto subscribe and unsubscribe; best practices; more performance | https://blog.angularindepth.com/the-best-way-to-unsubscribe-rxjs-observable-in-the-angular-applications-d8f9aa42f6a0 https://cycle.js.org/ https://angular.io/guide/rx-library#naming-conventions-for-observables | public tokenList: ProjectTokenModel[]; | public tokenList$: Observable<ProjectTokenModel[]>; |
component name and selector name are the same; add project prefix | more readable code; best practices; angular cli using by default | https://angular.io/guide/styleguide#component-selectors https://angular.io/guide/styleguide#component-custom-prefix | selector: 'dashboard-projects-view' class ViewProjectComponent | selector: 'pldb-projects-view' class ProjectsViewComponent |
don't use export * from '...' in 'functions/src/index.ts' | could lead to name confilcts | - | export * from './user/stats'; | export const value = onValue |
use defined type instead any, where possible | more readable code and check type in time compilation | - | - | - |
add library ngrx-store or another redux state container | makes app more supportable; it helps to design architecture for application; Angular + Firebase + Ngrx is well documented | https://ngrx.io/guide/store | - | - |
create common folder for model interfaces | combine models from web folder and functions folder in one place | - | - | - |
Review and make a list of general suggestions / improvements.
When creating list of improvements include (but no need to include every location it occurs):
Sections:
functions/
web/