score:0

it works like following. please compare your solution. basically topmost route should have path as "/" for children "/" not required

<router history={apphistory}>
        <route path="/" component={main}>
            <route path="test" component={test}/>
            <route path="*" component={test}/>
        </route>
</router>

const main = ({children, history}) => {
return (
<div>
<nav>
        <div history={history}/>
      </nav>
      <div>
        {children}
      </div>
</div>
 )
}

Related Query

More Query from same tag