Skip to content

Instantly share code, notes, and snippets.

@asolove
Created July 28, 2016 16:07
Show Gist options
  • Save asolove/4f0b3b39eb1ba472702e400b6f508730 to your computer and use it in GitHub Desktop.
Save asolove/4f0b3b39eb1ba472702e400b6f508730 to your computer and use it in GitHub Desktop.
Refactor to component
import {Component} from 'react'
export default class Thingy extends Component {
render() {
const {a, b} = this.props;
return <div>{a} <span>{b}</span></div>
}
}
export default ({a, b}) => {
<div>{a} <span>{b}</span></div>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment