Skip to content

Commit f264c49

Browse files
committed
Fix rendering to body warning in example projects.
1 parent 94737a7 commit f264c49

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

examples/browserify-gulp-example/src/app/app.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
//https://github.com/zilverline/react-tap-event-plugin
1313
injectTapEventPlugin();
1414

15-
// Render the main app react component into the document body.
15+
// Render the main app react component into the app div.
1616
// For more details see: https://facebook.github.io/react/docs/top-level-api.html#react.render
17-
React.render(<Main />, document.body);
17+
React.render(<Main />, document.getElementById('app'));
1818

1919
})();

examples/browserify-gulp-example/src/www/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
</head>
1212

1313
<body>
14+
<div id="app"></div>
15+
1416
<!-- This script adds the Roboto font to our project. For more detail go to this site: http://www.google.com/fonts#UsePlace:use/Collection:Roboto:400,300,500 -->
1517
<script>
1618
var WebFontConfig = {

examples/webpack-example/src/app/app.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
//https://github.com/zilverline/react-tap-event-plugin
1313
injectTapEventPlugin();
1414

15-
// Render the main app react component into the document body.
15+
// Render the main app react component into the app div.
1616
// For more details see: https://facebook.github.io/react/docs/top-level-api.html#react.render
17-
React.render(<Main />, document.body);
17+
React.render(<Main />, document.getElementById('app'));
1818

1919
})();

examples/webpack-example/src/www/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
</head>
1212

1313
<body>
14+
<div id="app"></div>
15+
1416
<!-- This script adds the Roboto font to our project. For more detail go to this site: http://www.google.com/fonts#UsePlace:use/Collection:Roboto:400,300,500 -->
1517
<script>
1618
var WebFontConfig = {

0 commit comments

Comments
 (0)