andreypopp/react-router-component — pull request #27 by matthewwithanm (2014-03-27 20:43:37+00:00)
Title: CaptureClicks component

This isn't merge-ready yet, but I figured we could use the thread for review. The component is here, and has passing tests for the basic case. A few questions:

* It feels like `findMatch` doesn't really belong here/is reimplementing other stuff. Can this be factored out of something else?
* Does `matchRoutes` indicate that a route wasn't matched in any way (besides returning the notFound handler)? It seems like that would be good for utilities like this one that want to treat unrouted paths some way other than showing the notFound route. Maybe we could just add a boolean to the `Match` object?
* Do you have any ideas about how I can recurse into the "router tree"? I think this is needed to recognize when a path matches a route "path" but has no matching leaf. (See [here])

Of course, any feedback on what I've done here would be much appreciated too. I tried to match the coding style of the project, but feel free to flag lines.

Thanks so much for the awesome project, BTW. Your responsiveness in the IRC channel and thoughtfulness have been amazing!

[here]: https://github.com/matthewwithanm/react-router-component/blob/c3be5cbc3c7cec507cf6769784b0191359662713/lib/CaptureClicks.js#L80