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 ?

4

1 回答 1

0

我认为您要使用的是<Link to="#LOCATION" />. 它在有关Link标签的to属性的文档中说:要链接到的路由的名称,或完整的 URL。. 试试看,看看是否有效。

于 2015-08-19T13:33:16.167 回答