Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 714 Bytes

5-redux-wines.md

File metadata and controls

33 lines (23 loc) · 714 Bytes

Use redux to manage wines from a region

this part is quite simple as it is similar to the previous one, so it's up to you ;-)

Actions

export const setWines = (wines) => ???
export const fetchWinesFrom = (region) => ???

Reducer

export const wines = (state = [], action) => ???

Component props

function mapFromStoreToProps(store) {
  return {
    wines: store.wines,
    loading: store.loading === 'HTTP_LOADING',
  };
}

export const WineListPage = connect(mapFromStoreToProps)(_WineListPage);

What's next

Now you're ready to use redux to load some wine details. Go to the next step to learn how to do that.