Skip to content

Commit

Permalink
Use ES Module to export App.
Browse files Browse the repository at this point in the history
  • Loading branch information
tai2 committed Sep 1, 2016
1 parent 57cc7d5 commit 33c2ff6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/app_dev.jsx
Expand Up @@ -27,4 +27,4 @@ function App(props) {
);
}

module.exports = App;
export default App;
4 changes: 2 additions & 2 deletions src/index_dev.jsx
@@ -1,13 +1,13 @@
import "babel-polyfill";
import React from 'react';
import { render } from 'react-dom';
const App = require('app/components/app_dev.jsx');
import App from 'app/components/app_dev.jsx';

render(<App/>, document.getElementById('app'));

if (module.hot) {
module.hot.accept('app/components/app_dev.jsx', function() {
const NextApp = require('app/components/app_dev.jsx');
const NextApp = require('app/components/app_dev.jsx').default;
render(<NextApp/>, document.getElementById('app'));
});
}

0 comments on commit 33c2ff6

Please sign in to comment.