How to iterate through React child components in Typescript tsx?
The following would be true: jsx:
public render() { return ( <div> {React.Children.map(this.props.children, x => x.props.foo)} </div> ); }
However, in Typescript, type x is equal to React.ReactElement<any> , so I do not have access to the details. Are there any castings I need to do?
source share