Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import React, { PropTypes } from 'react';
  2.  
  3. export const CounterComponent = ({ value, increase, decrease }) => (
  4. <div className="counter">
  5. <h1>{value}</h1>
  6. <button onClick={increase}>Increase</button>
  7. <button onClick={decrease}>Decrease</button>
  8. </div>
  9. );
  10.  
  11. CounterComponent.propTypes = {
  12. value: PropTypes.number,
  13. increase: PropTypes.func,
  14. decrease: PropTypes.func,
  15. };
  16.  
  17. export default CounterComponent;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement