- more!
This commit is contained in:
19
app/containers/Events.js
Normal file
19
app/containers/Events.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { fetchEvents } from '../actions/events.js';
|
||||
import { getEventsAsList } from '../selectors/events.js';
|
||||
|
||||
import Events from '../screens/Events.js';
|
||||
|
||||
const matchStateToProps = (state) => {
|
||||
const events = getEventsAsList(state);
|
||||
console.log('events:', events);
|
||||
|
||||
return { events };
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
fetchEvents: () => dispatch(fetchEvents(dispatch)),
|
||||
});
|
||||
|
||||
export default connect(matchStateToProps, mapDispatchToProps)(Events);
|
||||
Reference in New Issue
Block a user