Using React-Router to communicate within a page

I am trying to make an anchor tag that will link to a location on the same page (like this )

However, React-Router grabs this and directs me to nowhere since I have not set this link in the hierarchy. So it sends me to the root location of that name instead of a location on the same page.

+3


source to share


1 answer


If I understand your question, you can use hashlocation instead of history location. like this



ReactRouter.run(routes, hashlocation, (Handler) => {
  React.render(<Handler/>);
});

      

+1


source







All Articles