2

I am trying to build a parallax website with react and react-router

In most react-router examples I found, target dom node is replaced with Handler corresponding to the route.

var routes = (
    <Route handler={App} path="/">
        <DefaultRoute handler={Home} />
        <Route name="about" handler={About} />
        <Route name="users" handler={Users} />
    </Route>
);

Router.run(routes, function (Handler) {
    React.render(<Handler/>, document.body);
});

How can I render all the route handlers into single page and jump to specific location in a page with react-router ?

kiran
  • 1,246
  • 1
  • 10
  • 16
  • 2
    Sounds like you would need path variables inside of the routes that would determine where to scroll too. https://github.com/rackt/react-router/blob/master/docs/guides/overview.md#dynamic-segments – Cory Danielson Feb 18 '15 at 17:47

1 Answers1

0

I think what you want to use is the <Link to="#LOCATION" />. It says in the documentation about the to attribute of the Link tag: The name of the route to link to, or a full URL.. Try that and see if that works.

Hatem Jaber
  • 2,341
  • 2
  • 22
  • 38