You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@piusnig This error is coming because in postReducers.js you probably typed:
case 'NEW_POST':
return{
...state,
items: action.payload // notice items
};
instead of:
case 'NEW_POST':
return{
...state,
item: action.payload // notice item
};
So, posts variable which is defined as an array gets replaced by an object when you create a new post.
this.props.posts.map is not a function
at this point
const postItems = this.props.posts.map(function(post) {
The text was updated successfully, but these errors were encountered: