January 2020
Intermediate to advanced
470 pages
11h 13m
English
3.1 Uninitialized object? React-Redux programmers usually code action creators to simplify the creation of actions that will later be processed by a reducer. Actions are objects, which must include a type attribute that is used to determine what kind of action you are dispatching. The following code supposedly does this, but can you explain the unexpected results?
const simpleAction = t => { type: t;};console.log(simpleAction("INITIALIZE"));// undefined
3.2. Are arrows allowed? Would everything be the same if you defined listArguments() and listArguments2() from the Working with arguments section by using arrow functions instead of the way we did, with the function keyword?
3.3. One liner: Some programmer, particularly thrifty ...
Read now
Unlock full access