Creating the action

We will start by creating an action creator, a helper function that helps us create actions:

// dataflow/actions.jsexport function createItem(title){  return { type: "CREATE_ITEM", payload: { title: title } };}

Get Architecting Angular Applications with Redux, RxJS, and NgRx now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.