Created
July 28, 2016 16:07
-
-
Save asolove/4f0b3b39eb1ba472702e400b6f508730 to your computer and use it in GitHub Desktop.
Refactor to component
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
import {Component} from 'react' | |
export default class Thingy extends Component { | |
render() { | |
const {a, b} = this.props; | |
return <div>{a} <span>{b}</span></div> | |
} | |
} |
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
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