import React, {Component} from 'react';
import Channel from './Channel';

class ChannelList extends Component{
  render(){
    return (
      <ul>{
        this.props.channels.map( chan =>{
          return <Channel
            channel={chan}
            key={chan.id}
            {...this.props}
          />
        })
      }</ul>
    )
  }
}

ChannelList.propTypes = {
  channels: React.PropTypes.array.isRequired,
  setChannel: React.PropTypes.func.isRequired,
  activeChannel: React.PropTypes.object.isRequired
}

export default ChannelList

@@ -120,40 +120,30 @@
 ()%7B%0A
+%0A
     
-return (%0A      %3Cul%3E%7B%0A       
+var channelList =
  thi
@@ -175,14 +175,11 @@
 n =%3E
+ 
 %7B%0A
-    
     
@@ -195,28 +195,16 @@
 %3CChannel
-%0A           
  channel
@@ -210,28 +210,16 @@
 l=%7Bchan%7D
-%0A           
  key=%7Bch
@@ -228,20 +228,8 @@
 .id%7D
-%0A           
  %7B..
@@ -244,40 +244,73 @@
 ops%7D
+ /%3E
 %0A    
-      /%3E%0A        %7D)
+%7D);%0A%0A    return (%0A      %3Cul%3E%0A        %7BchannelList%7D
 %0A      
-%7D
 %3C/ul

improve code style