Skip to content

Instantly share code, notes, and snippets.

@niinpatel
Created July 2, 2018 14:37
Show Gist options
  • Save niinpatel/7b155fc04b64c688e7e8126b588127c4 to your computer and use it in GitHub Desktop.
Save niinpatel/7b155fc04b64c688e7e8126b588127c4 to your computer and use it in GitHub Desktop.
import React, { Component } from 'react';
import './App.css';
import ResultComponent from './components/ResultComponent';
import KeyPadComponent from "./components/KeyPadComponent";
class App extends Component {
constructor(){
super();
this.state = {
result: ""
}
}
render() {
return (
<div>
<div className="calculator-body">
<h1>Simple Calculator</h1>
<ResultComponent result={this.state.result}/>
<KeyPadComponent onClick={this.onClick}/>
</div>
</div>
);
}
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment