Skip to content

Commit 878c9fa

Browse files
authored
Define mountNode on homepage
fixes #1017
1 parent 796257b commit 878c9fa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

content/home/examples/a-simple-component.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ class HelloMessage extends React.Component {
88
}
99
}
1010

11+
// DOM element to render React inside
12+
const mountNode = document.querySelector("#hello-message")
13+
1114
ReactDOM.render(
1215
<HelloMessage name="Taylor" />,
1316
mountNode
14-
);
17+
);

0 commit comments

Comments
 (0)