Skip to content

Instantly share code, notes, and snippets.

@huhn511
Last active June 30, 2018 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huhn511/782881773459f69cd6c42c6b11665463 to your computer and use it in GitHub Desktop.
Save huhn511/782881773459f69cd6c42c6b11665463 to your computer and use it in GitHub Desktop.
App.js
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import SendButton from './components/SendButton'
class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h1 className="App-title">Welcome to React</h1>
</header>
<SendButton />
</div>
);
}
}
export default App;
import React, { Component } from 'react';
class SendButton extends Component {
send() {
console.log("Send!");
}
render() {
return (
<button onClick={this.send}>Send Transaction</button>
);
}
}
export default SendButton;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment