brutal-legends/src/actions/index.js
Anders Ytterström ec27589232 Initial Commit
React app with Redux state, mostly based around the todo example in the
Redux documentation.

It's a list of items (albums) which can be filtered by a string.

 * A list of albums that is mapped from state to props.
 * A filter input is controlled by redux state.
2018-11-21 14:57:00 +01:00

14 lines
336 B
JavaScript

export const INIT_ALBUM_LIST = 'INIT_ALBUM_LIST';
export const SET_VISIBILITY_FILTER = 'SET_VISIBILITY_FILTER';
export const initAlbumList = payload => ({
type: INIT_ALBUM_LIST,
payload
});
export const setVisibilityFilter = filter => ({
type: SET_VISIBILITY_FILTER,
payload: {
filter,
}
});