Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. import React from 'react';
  2. import ReactDom from 'react-dom';
  3.  
  4. const Button = ({ children, onClick, type = 'button' }) => (
  5. <button type={type} className='btn' onClick={onClick} >
  6. {children}
  7. </button>
  8. );
  9.  
  10. ReactDOM.render(
  11. <Button
  12. onClick={() => console.log('You just clicked')}
  13. >
  14. Example
  15. </Button>,
  16. document.getElementById('root')
  17. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement