Skip to content

Instantly share code, notes, and snippets.

@bringking
Created May 29, 2015 20:21
Show Gist options
  • Save bringking/9a1f25bf8e4d795137dd to your computer and use it in GitHub Desktop.
Save bringking/9a1f25bf8e4d795137dd to your computer and use it in GitHub Desktop.
De-structure props
import React from "react/addons"
import RepoListContainer from "./repo_list/repo_list_container"
export default class Home extends React.Component {
onClick(){
console.log("container clicked");
}
render() {
let repoListProps = {
onClick:this.onClick.bind(this),
style:{
"visibility" :"visible"
}
};
return (
<div className="container-fluid">
<div className="row">
<RepoListContainer {...repoListProps} className="col-md-12"/>
</div>
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment