Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions public/app.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const root = document.querySelector('#root');

function Click() {
alert(1);
function Click(msg) {
alert(msg);
}

const element = /*#__PURE__*/React.createElement("button", {
onClick: Click
onClick: Click.bind(this, 'hello world')
}, "Click me");
ReactDOM.render(element, root);
6 changes: 3 additions & 3 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const root = document.querySelector('#root');

function Click() {
alert(1);
function Click(msg) {
alert(msg);
}
const element = (
<button onClick={Click}>Click me</button>
<button onClick={Click.bind(this, 'hello world')}>Click me</button>
);

ReactDOM.render(element, root);
Expand Down