Newbie question: I'm learning ReactJS+Typescript.
I have a simple interface describing an array of data:
interface IProfile {
name: string;
avatar_url: string;
company: string;
}
const testData: IProfile[] = [
{ name: "Dan Abramov", avatar_url: "https://avatars0.githubusercontent.com/u/810438?v=4", company: "@facebook" },
{ name: "Sophie Alpert", avatar_url: "https://avatars2.githubusercontent.com/u/6820?v=4", company: "Humu" },
];
I have a simple call to an App function where I pass the array spread:
ReactDOM.render(
<App {...testData} />,
document.getElementById("root")
);
In the App the props is not an array though???:
class App extends React.Component<IProfile[]> {
constructor(props:IProfile[]) {
super(props);
console.log("props is array " + Array.isArray(props)); //false
}
public render() {
return (<div> </div>);
}
};
When I look at the props in the React Dev Tools in Chrome, it looks like an array though:

Propsis an Object,props.testDatais an array.