Skip to content

Instantly share code, notes, and snippets.

@gpDA
Created September 11, 2019 16:47
Show Gist options
  • Save gpDA/0459a223ba1f7521b5a5e275b941f4bc to your computer and use it in GitHub Desktop.
Save gpDA/0459a223ba1f7521b5a5e275b941f4bc to your computer and use it in GitHub Desktop.
// TableUI.js
class TableUI extends Component{
handleSortClick = sortType => {
const {onSortClick} = this.props;
onSortClick(sortType)
}
render(){
const { handleSortClick } = this;
return(
<Table>
<thead>
<tr>
<th onClick={() => handleSortClick('studentId}>
studentId
</th>
</tr>
</thead>
</Table>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment