Created
July 27, 2017 21:31
-
-
Save neciu/f5e5936a2cd0e95b94f139ba91b9ef54 to your computer and use it in GitHub Desktop.
[Your last ESLint config] before lint
This file contains hidden or 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 React from 'react'; | |
const Component = ( | |
{a, b} | |
) => <div> | |
<h1 onClick= {b}>LOL {a}</h1> | |
</div>; | |
export default class SecondComponent extends React.Component { | |
state = {field1: 'one', field2: 'two', | |
fiel3: 'three'} | |
render() { | |
const { | |
field1 | |
} = this.state | |
return <Component a = {field1} | |
b={this.handleB} | |
/>; | |
} | |
handleB = () => { | |
console.log('LOL') | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment