rackt/react-router — pull request #181 by karlmikko (2014-08-07 23:21:19+00:00)
Title: [added]  path prop on Routes for server rendering

This PR allows the path to be given to as a prop.

```javascript
...
```
This only works server side. This patch also stopes the URLStore and Routes store being started as componentWillMount is called but componentWillUnmount isn't call on server side. This would lead to a memory leak and potential async issue when multiple pages are being rendered at once.

When rendering on server side you should always make a new instance of so if multiple pages are being rendered they don't change the routes in another page.

```javascript
var App = React.createClass({
render: function(){
return ...
}
});

//server side
React.renderComponentToString();

//client side
React.renderCompoent(, domelement);
```

This PR will only work for non async state server side rendering. However issue #57 has some strategies planned to make that work. This PR is a good stepping stone for async server side rendering.

All existing 50 Tests PASS!

I don't think docs need to be updated until the final server side strategy is in place.