daily pastebin goal
17%
SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Calculator extends React.PureComponent {
  2.  
  3.   constructor(props) {
  4.     super(props);
  5.     this.state = {
  6.        result: 0
  7.     };
  8.   }
  9.  
  10.   subtract = (a,b) => {
  11.     return a - b;
  12.   }
  13.  
  14.   add = (a,b) => {
  15.     return a + b;
  16.   }
  17.  
  18.   render(){
  19.     return <p>{this.add(5,5)}</p>
  20.   }
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top