Commit graph

9 commits

Author SHA1 Message Date
Anders Ytterström
d447143312 Display selected album in Modal
A new Component and Container is introduced: Modal.

It dispatches an UNSELECT_ALBUM action when clicked on.

Some CSS is added to bur out the background and display the modal
content properly.
2019-04-24 09:58:02 +02:00
Anders Ytterström
1ceb248df9 Handle click on album
Click on album should dispatch an SELECT_ALBUM action.

This is done by map to AlbumList, and providing a property to each
album. It could also had been done by introducing a container for Album,
but IMHO that's not motivated.
2019-04-24 09:58:02 +02:00
Anders Ytterström
60e70f4b34 Add selected album actions and reducers
Default state is an empty object ({}).
SELECT_ALBUM will update state with an album.
UNSELECT_ALBUM resets state to default state.
2019-04-24 09:58:02 +02:00
Anders Ytterström
c11b1d4653 Load albums asyncronously
Introducing redux-sagas.
2019-04-24 09:58:02 +02:00
Anders Ytterström
3f0ac404f0 Do some spring cleaning 2019-04-24 09:58:02 +02:00
Anders Ytterström
4266dbcf6b Upgrade dependencies 2019-04-24 09:58:02 +02:00
Anders Ytterström
d722027781 🎨 Improve code readability
Rename files for consistency and clarification
2019-04-24 09:57:41 +02:00
Anders Ytterström
3d06ff065d Sort albums by year, artist or id
* The store gets a sort key.
 * Action creators and actions are added to set sort key.
 * A component is added which dispatches a reducer to update the state.
 * Album list get the sort key from the state and sort albums on render.
2018-11-21 14:58:11 +01:00
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