KyleAMathews / coffee-react-quickstart

Quickstart for building React single page apps using Coffeescript, Gulp, Webpack, and React-Router
http://kyleamathews.github.io/coffee-react-quickstart
MIT License
254 stars 41 forks source link

Explicit render target to prevent issues with react-router #25

Closed holmesal closed 9 years ago

holmesal commented 9 years ago

Awesome work on this! I ran into a nasty bug last night with react-router, so in the interest of saving others the trouble...

When changing routes via .transitionTo(), react-router will (on certain machines, seems to be a race condition) render multiple <Router>s into the body. This causes a slew of ReactMount errors.

The fix (suggested by OP) was to render to an explicit target, as opposed to <body>.

Issue thread: react-router/issues/600