Explain me about props as an array in react component

In this challenge when we pass an as props, How react component destructure that array and get the items to display?

  <ChildComponent colors={["green", "blue", "red"]} />

In the snippet above, passing the array ["green", "blue", "red"] to ChildComponent means that ChildComponent now have access to that array. And it can be accessed on props.colors or by destructuring it off props

For example:

const ChildComponent = ({colors}) => <div>{colors[0]}</div> // green

// or

const ChildComponent = (props) => <div>{props.colors[0]}</div> // green