March 2018
Intermediate to advanced
364 pages
8h 21m
English
The following files points to the demo project Chapter9/BestPractices.
So far, we have created some working code, but it could look a lot better, and be less error prone as well. There are steps we can take to improve the code, those are:
Let's have a look at our first bullet point. Given the type of actions we perform on our jediList, we can create a constants.ts file for them, like so:
// jedi.constants.tsexport const ADD_JEDI = 'ADD_JEDI';export const REMOVE_JEDI = "REMOVE_JEDI";export const LOAD_JEDIS ="LOAD_JEDIS"; ...
Read now
Unlock full access