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.
14 lines
336 B
JavaScript
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,
|
|
}
|
|
});
|