Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- import ReactDOM from 'react-dom';
- document.addEventListener('DOMContentLoaded', function(){
- class Click extends React.Component {
- handleClick = () => {
- console.log('dziaลa')
- }
- render() {
- return(
- <button onClick={this.handleClick}>Klik!</button>
- )
- }
- }
- ReactDOM.render(
- <Click />,
- document.getElementById('app')
- );
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement