Skip to content

Commit 93846b3

Browse files
committed
updated app.js
1 parent 4c5d8eb commit 93846b3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
class Channel extends React.Component{
2+
onClick(){
3+
console.log('I was clicked', this.props.name);
4+
}
25
render(){
36
return(
4-
<li>Channel Name</li>
7+
<li onClick={this.onClick.bind(this)}>{this.props.name}</li>
58
)
69
}
710
}
811

9-
ReactDOM.render(<Channel />, document.getElementById('app'));
12+
ReactDOM.render(<Channel name='Hardware Support'/>, document.getElementById('app'));

0 commit comments

Comments
 (0)