Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Arrow function in Class property - react
class App extends React.Component {
state = {
message: 'Hello World!'
logMessage = () => {
render() {
return (
<div className="App">
value="Show message"
onClick={() => this.logMessage()}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.