Skip to content

Instantly share code, notes, and snippets.

View smoidu's full-sized avatar

smoidu smoidu

View GitHub Profile
@smoidu
smoidu / gist:f0b014428d3a5a71d61d06346d9643c1
Created April 6, 2016 19:55
es6 class and cloneElement
const { Router,
Route,
IndexRoute,
Redirect,
Link,
IndexLink
} = ReactRouter
const StandardClass = class ComponentClass extends React.Component {
constructor(props) {
const { Router,
Route,
IndexRoute,
Redirect,
Link,
IndexLink
} = ReactRouter
const Wrap = function(Component) {
return React.createClass({