Skip to content

Instantly share code, notes, and snippets.

@neciu
Created July 27, 2017 21:31
Show Gist options
  • Save neciu/f5e5936a2cd0e95b94f139ba91b9ef54 to your computer and use it in GitHub Desktop.
Save neciu/f5e5936a2cd0e95b94f139ba91b9ef54 to your computer and use it in GitHub Desktop.
[Your last ESLint config] before lint
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