import React from 'react';
import VideoListItem from './video_list_item';

const VideoList = (props) => {
    const videoItems = props.videos.map((video) => {
        return <VideoListItem video = { video }/>
    });

    return (
        <ul className="col-md-4 list-group">
            { videoItems }
        </ul>
    );
};

export default VideoList;
import React from 'react';
import VideoListItem from './video_list_item';

const VideoList = (props) => {

    // use .map instead of iterating through an array --> helper functions ES6
    const videoItems = props.videos.map((video) => {
        return <VideoListItem video = { video }/>
    });

    return (
        <ul className="col-md-4 list-group">
            { videoItems }
        </ul>
    );
};

export default VideoList;
Use map fnct v any helper fncts instead of any loops
Use map fnct v any helper fncts instead of any loops
