Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rendering to body warning in example projects. #1983

Merged
merged 2 commits into from
Oct 23, 2015
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
5 changes: 3 additions & 2 deletions examples/browserify-gulp-example/src/app/app.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(function () {
let React = require('react');
let ReactDOM = require('react-dom');
let injectTapEventPlugin = require('react-tap-event-plugin');
let Main = require('./components/main.jsx'); // Our custom react component

Expand All @@ -12,8 +13,8 @@
//https://github.com/zilverline/react-tap-event-plugin
injectTapEventPlugin();

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

})();
2 changes: 2 additions & 0 deletions examples/browserify-gulp-example/src/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</head>

<body>
<div id="app"></div>

<!-- 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 -->
<script>
var WebFontConfig = {
Expand Down
5 changes: 3 additions & 2 deletions examples/webpack-example/src/app/app.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(function () {
let React = require('react');
let ReactDOM = require('react-dom');
let injectTapEventPlugin = require('react-tap-event-plugin');
let Main = require('./components/main.jsx'); // Our custom react component

Expand All @@ -12,8 +13,8 @@
//https://github.com/zilverline/react-tap-event-plugin
injectTapEventPlugin();

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

})();
2 changes: 2 additions & 0 deletions examples/webpack-example/src/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</head>

<body>
<div id="app"></div>

<!-- 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 -->
<script>
var WebFontConfig = {
Expand Down