- implementing immutable.js
This commit is contained in:
18
app/containers/Auction.js
Normal file
18
app/containers/Auction.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { getItems, getStatus } from '../actions/index.js';
|
||||
|
||||
import { getAuctionItemsAsList } from '../selectors/items.js';
|
||||
|
||||
import Auction from '../screens/Auction.js';
|
||||
|
||||
const matchStateToProps = (state) => ({
|
||||
items: getAuctionItemsAsList(state),
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
fetchItems: () => dispatch(getItems(dispatch)),
|
||||
fetchStatus: () => dispatch(getStatus(dispatch)),
|
||||
});
|
||||
|
||||
export default connect(matchStateToProps, mapDispatchToProps)(Auction);
|
||||
Reference in New Issue
Block a user