import React from 'react' import NavLink from './NavLink' export default React.createClass({ contextTypes: { router: React.PropTypes.object }, handleSubmit(event) { event.preventDefault() const userName = event.target.elements[0].value const repo = event.target.elements[1].value const path = `/repos/${userName}/${repo}` this.context.router.push(path) }, render() { return (

Repos

{this.props.children}
) } })