React-hot-loader: Up to date react-hot-loader example using express

Created on 24 Jul 2016  路  4Comments  路  Source: gaearon/react-hot-loader

I've spent many hours trying to get react-hot-loader to work through webpack and express and I've been able to get content to show however I get a ton of event source errors on the network logs and 'mime type' errors in the console. Content is being reloaded constantly even if code hasn't changed causing my computers fan to start going crazy. After giving up and looking for examples online I was not able to find example repos that are up to date or articles that aren't from a year ago. All articles seem to do things differently and it's pretty confusing. Is there any example you can point me to a github repository that sets up react-hot-loader with webpack and express (to use with existing web server) and no isomorphic/universal setup?

This is for react-hot-loader v1.3.0

question

Most helpful comment

Hi @sandysaders,

i had to showcase react-hot-loader yesterday and made a quick and dirty example for a colleague with express. feel free to pick the parts you need if they're suitable for you. it's based on [email protected].

https://github.com/tststs/react-hot-loader-3-express-example

All 4 comments

Same issue frustrating!!!

I don't have an example at hand using both Express and RHL 1.3.0, but I've used an existing Express app with the RHL 3 beta without a problem.

You'll need both webpack-dev-middleware and webpack-hot-middleware. See the webpack-hot-middleware README for setup.

Hi @sandysaders,

i had to showcase react-hot-loader yesterday and made a quick and dirty example for a colleague with express. feel free to pick the parts you need if they're suitable for you. it's based on [email protected].

https://github.com/tststs/react-hot-loader-3-express-example

Changed react-hot-boilerplate/next to use RHL 1 here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JamesIves picture JamesIves  路  4Comments

zlk89 picture zlk89  路  3Comments

adesmet picture adesmet  路  4Comments

Opty1712 picture Opty1712  路  4Comments

theKashey picture theKashey  路  4Comments