import React from "react";
import StoryItem from "../story/StoryItem";

const Stories = ({ stories }) => {
  if (!stories.length) {
    return null;
  }

  return (
    <div>
      {stories.map(story => (
        <StoryItem key={story.id} {...story} />
      ))}
    </div>
  );
};

export default Stories;

import React from "react";
import StoryItem from "../story/StoryItem";

const Stories = ({ stories }) => {
  if (!stories.length) {
    return null;
  }

  return (
    <div>
      {stories.map(story => (
        <StoryItem key={story.id} story={story} />
      ))}
    </div>
  );
};

export default Stories;

Make StoryItem receive story object
Make StoryItem receive story object

It receives the object of story instead of only its fields.
