I have an array stored in my redux store, but when I call notifications.map((x, i) => {} nothing actually renders to the view... however if I console.log x to the console then they print....
How do I get my array contents to render to the view?
import React from 'react'
import { connect } from 'react-redux'
import {List, ListItem} from 'material-ui/List'
const mapStateToProps = state => {
return {
notifications: state.notificationsReducer.notifications,
errorMessage: state.notificationsReducer.errorMessage
}
}
const notifications = ({notifications, errorMessage}) => {
notifications.map((x, i) => {
console.log(x.title)
})
return (
<List>
{notifications.map((x, i) => {
<ListItem key={i} primaryText={x.title} />
})}
</List>
)
}
const Notifications = connect(mapStateToProps)(notifications)
export default Notifications