Skip to content

Commit

Permalink
Merge pull request mui#1983 from davidmdem/Example_warnings_fix
Browse files Browse the repository at this point in the history
[Exemple] Fix rendering to body warning in example projects.
  • Loading branch information
oliviertassinari committed Oct 23, 2015
2 parents 94737a7 + 7f54529 commit 6a9be42
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
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

0 comments on commit 6a9be42

Please sign in to comment.