score:8

Accepted answer

You need to specify what type of props the child component wants. For example:

interface Item {
  title: string;
  id: number;
}

interface ChildComponentProps {
  items: Item[]
}

const ChildComponent: React.FC<ChildComponentProps> = (props) => {
  return (
    <div>
      {props.items.map((item) => (
        <p to={item.title}></p>
      ))} 
    </div>
  )
}

score:2

Added to the reply, if the props can be null, you put a question mark.

interface ChildComponentProps {
  items?: Item[]
}

Related Query

More Query from same tag