NgRx Tips — Part 3 — Actions

John Youngers
Youngers Consulting
1 min readFeb 1, 2018

A month ago I wrote an article on how I’m currently creating actions: instead of reworking that article to fit into this series I’ll just summarize it here.

In a central location I have a redux.ts file, which contains an abstract class and reducer function to setup features:

Using this methodology, for any new action you simply create a new class: no need to create a new type string (I was never a fan of copy/pasting ‘[Feature] My Action’ over and over), no need to reference that type string in another file (reducer) in a switch statement— it’s all in one spot.

Continued Reading: Part 4

--

--