August 2017
Beginner
374 pages
10h 41m
English
Now that we have an action creator to pull a single user from the API, we just need to modify our fetchPosts action creator to call the fetchUser action creator for every username:
const getUsernamesFromPosts = (posts) =>
posts.reduce((usernames, post) => { if (!usernames.includes(post.user)) { return [ ...usernames, post.user ] }Read now
Unlock full access