react-router4 supports the following modes:
var toPathRegexp = pathToRegexp.compile("/user/:id(\\d+)")
toPathRegexp({ id: 123 }) //=> "/user/123"
toPathRegexp({ id: "123" }) //=> "/user/123"
toPathRegexp({ id: "abc" }) //=> Throws `TypeError`.
but this mode is not supported in react-router4. Can you only use this / user/:id mode?