Skip to content

Instantly share code, notes, and snippets.

View domyen's full-sized avatar

Dominic Nguyen domyen

View GitHub Profile
@domyen
domyen / CommentList.jsx
Last active April 10, 2017 21:55
Presentational component example (via @chantastic)
// CommentList.jsx (PRESENTATION)
class CommentList extends React.Component {
constructor(props) {
super(props);
}
render() {
return <ul> {this.props.comments.map(renderComment)} </ul>;
}
@domyen
domyen / CommentList.jsx
Last active April 10, 2017 21:56
Single-use component example (via @chantastic)
// CommentList.jsx (DATA + PRESENTATION)
// inspired by Michael Chan https://gist.github.com/chantastic/fc9e3853464dffdb1e3c
class CommentList extends React.Component {
constructor(props) {
super(props);
this.state = { comments: [] }
}
componentDidMount() {
td {
>img:nth-of-type(4){
display:none
}
}
Started GET "/get_started/make" for 127.0.0.1 at 2011-11-10 19:08:23 -0800
Processing by GetStartedController#make as HTML
User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
Rendered get_started/_first_steps.html.erb (3.1ms)
Rendered get_started/make.html.erb within layouts/application (119.4ms)
Rendered application/_header.html.erb (5.9ms)
Compiled screen.css (15658ms) (pid 14040)
Compiled application.js (75ms) (pid 14040)
Compiled external/jquery-1.5.1.js (93ms) (pid 14040)
Compiled external/jquery.ui/jquery.ui.core.js (1ms) (pid 14040)