Actions and Reducers

So, we have our core services and can start designing the Redux store. We can describe the intended state mutations in a table:

Action creator

Action Type

State Impact

toggleOpenAddFeed

TOGGLE_ADD_FEED

state.isOpenAddFeed

addFeed

ADD_FEED

state.isOpenAddFeed

state.feedError state.items

setFeedError

SET_FEED_ERROR

state.feedError

removeFeed

REMOVE_FEED

state.feedError

fetchFeed

FETCH_FEED

state.items state.feedError

fetchMenu

FETCH_MENU

state.menu state.items

state.activeFeedUrl

setActiveFeed

SET_ACTIVE_FEED

state.activeFeedUrl

First of all, we need to populate our feed menu. For that, we are going to have a modal window with a form to add a feed. The ...

Get Cross-platform Desktop Application Development: Electron, Node, NW.js, and React 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.