arch-js / arch

Web application framework for React by Red Badger
BSD 3-Clause "New" or "Revised" License
170 stars 13 forks source link

React Hot Loading #16

Closed tabazevedo closed 9 years ago

tabazevedo commented 9 years ago

Fully functional live editing of React components implemented via WebPack's hot module replacement. We also take advantage of HMR to soft-reload server code.

Usage

Your components must be recognisable as react-classes (if you export react classes then all is well!) and for the module ID swapping to work their display-name must be unique (Alternatively check the React Hot API to see how to define your own identifier.).

Simply running reflex s in your application root outside production will automatically enable Client and Server watch/reload.

Todo:

tabazevedo commented 9 years ago

@charypar what are your thoughts on tests? I'm not sure what the best way to go about writing tests for this would be.

charypar commented 9 years ago

@tabazevedo Not sure :-/ It's pretty much an integration job. Mocking the hell out of it doesn't seem very valuable.

Also, rebase?

tabazevedo commented 9 years ago

@charypar I rebased this on top of your work and its ready to be merged. I also made a minor PR to your app which works with this. https://github.com/redbadger/react-fw-app/pull/11