Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- import ReactDom from 'react-dom';
- const Button = ({ children, onClick, type = 'button' }) => (
- <button type={type} className='btn' onClick={onClick} >
- {children}
- </button>
- );
- ReactDOM.render(
- <Button
- onClick={() => console.log('You just clicked')}
- >
- Example
- </Button>,
- document.getElementById('root')
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement