reactjs - Changing route with react Router 4 from child -


i have problem react router , new update (version 4).

this im rendering:

<browserrouter>   <div>     <maincomponent/>      <link to="/firstchild" >this link</link>      <rout path="/firstchild" component={firstchild}/>     <route path="/secondchild" component={secondchild}/>    </div> </browserrouter> 

the first link renders firstchild component, supposed do.

but when have link within firstchild route secondchild component :

    <browserrouter>       <div>         <link to="/quelle">link secondchild</link>       </div>     </browserrouter> 

it changes route, secondchild component doesnt show up. after go , forth page (alt+arrowleft, alt+arrowright) loads secondchild.

so how create links in child components correctly, since seem fail horribly atm.

help appreciated! thanks


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -