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

What is 'hot' about this boilerplate app? #2

Open
mikelambert opened this issue Dec 14, 2016 · 4 comments
Open

What is 'hot' about this boilerplate app? #2

mikelambert opened this issue Dec 14, 2016 · 4 comments

Comments

@mikelambert
Copy link

mikelambert commented Dec 14, 2016

I see it linked from https://github.com/gaearon/react-hot-loader/tree/master/docs#starter-kits with description:

react-boilerplate-app (react (duh), router, webpack with dev server, babel, hot reloading)

And the README.md says:

A simple hot React app with webpack, routing, babel, dev server, css loader.

But I cannot find any hot-reloading code anywhere in this project...?

@vebits
Copy link
Owner

vebits commented Jan 22, 2017

It is using the react-hot-loader dependency.

@mikelambert
Copy link
Author

mikelambert commented Jan 24, 2017

Don't you need to be running an actual hot server (that will check for updates, and send updates to the client) in order for this to actually work as a hot reloader?

import webpack from 'webpack';
import hotMiddleware from 'webpack-hot-middleware';
const compiler = ...a new webpack, containing an webpack.HotModuleReplacementPlugin instance
app.use(hotMiddleware(compiler));

And don't the rendered components need to use react-hot-loader to ensure they know to ask the server for updates?

import { AppContainer } from 'react-hot-loader';
ReactDOM.render(<AppContainer><MyActualComponent</AppContainer>, ...)

These were both necessary to make a hot reloader actually work for me, and this project doesn't have either of them. It just has the .babelrc reference (which I also had, but found to be insufficient).

@Sedaj
Copy link

Sedaj commented Mar 19, 2017

Yes this doesn't work and need to be removed

@davidfufu
Copy link

Yup, hot reloading doesn't work here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants