-
Notifications
You must be signed in to change notification settings - Fork 85
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
Question on Client.js #85
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm a newbie and would like to ask regarding client.js code.
import React from 'react';
import ReactDOM from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import { Provider } from 'react-redux';
import App from './containers/App';
import configureStore from './stores';
const store = configureStore();
ReactDOM.render(
<AppContainer>
<Provider store={store}>
<App />
</Provider>
</AppContainer>,
document.getElementById('app')
);
// what's the use of this?
if (module.hot) {
module.hot.accept('./containers/App', () => {
const NextApp = require('./containers/App').default; // eslint-disable-line global-require
ReactDOM.render(
<AppContainer>
<Provider store={store}>
<NextApp />
</Provider>
</AppContainer>,
document.getElementById('app')
);
});
}
What's the use of this one in module.hot?
The text was updated successfully, but these errors were encountered: