M
M
Maxim Korolsky2016-06-13 21:06:20
React
Maxim Korolsky, 2016-06-13 21:06:20

How to display nested routes?

I can't figure out what I'm doing wrong

<Route path="/" component={RootComponent}>
        <IndexRoute component={HomePage} />

        <Route path="profile">
          <IndexRoute component={ProfilePage} />
          <Route path="view(/:profileId)" component={ProfilePage} />
          <Route path="add" component={AddProfile} />
          <Route path="edit(/:profileId)" component={EditProfile} />
        </Route>

It is necessary that the URL profile / add shows my view
Tell me where I made a mistake

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Korolsky, 2016-06-13
@SuperPosan

Corrected the question, everything works now

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question