Created
March 6, 2017 07:23
-
-
Save somethvictory/be7266007140ac26de86b2feae1321b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@UserList = React.createClass | |
getInitialState: -> | |
users: @props.users | |
newPath: @props.new_path | |
getDefaultProps: -> | |
users: [] | |
newPath: '' | |
render: -> | |
React.DOM.div | |
className: 'container' | |
React.DOM.h1 | |
className: 'title' | |
'Users' | |
React.DOM.a | |
className: 'btn btn-primary' | |
href: @state.newPath | |
'New User' | |
React.DOM.table | |
className: 'table table-bordered' | |
React.DOM.thead | |
className: 'table-header' | |
React.DOM.tr | |
className: '' | |
React.DOM.th | |
className: 'table-head' | |
'First Name' | |
React.DOM.th | |
className: 'table-head' | |
'Last Name' | |
React.DOM.th | |
className: 'table-head' | |
'Email' | |
React.DOM.tbody null, | |
for user in @state.users | |
React.createElement User, key: user.id, user: user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment