Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Router Tutorial , Nested Routes #260

Closed
daslicht opened this issue Nov 17, 2016 · 2 comments
Closed

Router Tutorial , Nested Routes #260

daslicht opened this issue Nov 17, 2016 · 2 comments

Comments

@daslicht
Copy link

daslicht commented Nov 17, 2016

reference : https://github.com/reactjs/react-router-tutorial/tree/master/lessons/04-nested-routes
Hi,
I have the following structure :

index.jsx
     Main
         Details

index.jsx:

    <Router history={hashHistory}>
        <Route path="/" component={Main}>
            <Route path="/details" component={Details}/>
        </Route>
    </Router>,

main.jsx:

render() {
    return (  
      <div>
        <ul>
          <li><Link activeStyle={{ color: 'red' }} to="/">Main</Link></li>
          <li><Link activeStyle={{ color: 'red' }} to="/details">Details</Link></li>
        </ul>

        {this.props.children}
        
      </div>
    );
  }

How to add content now for Main (path "/") please?
Do I need to push it into the properties ?

@Andersos
Copy link

You want to make a new entry in your index.jsx file that is an IndexRoute.

@daslicht
Copy link
Author

Thank you !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants