4

I want to link to a specific section section of a page with react router a lot like how anchor tags would work in html. However, I couldn't find solutions with React Router version 1.0.0.

Currently, i have my router like this:

let history = createHashHistory({ queryKey: false }); <Router history={history}> <Route path="/" component={a}/> <Route path="/b" component={b}/> <Route path="/c" component={c}/> <Route path="/d" component={d}/> <Route path="/e" component={e}/> <Route path="/f" component={f}/> <Route path="/g" component={g}/> </Router> 

and I am trying to link to a specific section in the components like

 <Link to="/b#{div_id}"> Go to section with div_id is component {b} </Link> 
3
  • See my update, this is not going to be supported Commented Dec 2, 2015 at 19:32
  • Is there any way to go to a certain part of a page with React then? Commented Dec 3, 2015 at 19:53
  • Check out this answer Commented Dec 3, 2015 at 20:22

1 Answer 1

1

There is currently an open issue on GitHub for this. It doesn't appear to be supported, but it should be supported when using HistoryLocation when this issue is fixed.

EDIT

This is no longer supported.

Sign up to request clarification or add additional context in comments.

1 Comment

I saw that link and I thought they already fixed it. Thank you for confirming it is still not supported

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.