A
A
Anton Antonov2019-08-01 09:29:26
css
Anton Antonov, 2019-08-01 09:29:26

How to anchor links?

We have a spa site. As planned by the designer, when we are on the main page, some route links behave like anchors, without moving to another page.
And another case, when you are, for example, on the contacts page, when you click on the terms page, the route jumps to the main page and anchors on terms ..
Do I understand correctly that this is a gesture?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Anton Spirin, 2019-08-01
@Antoskin

There are many solutions. The link has onClick, the component has componentDidMount. There are also ready-made solutions like react-router-hash-link

V
Vladislav Lyskov, 2019-08-01
@Vlatqa

well, do /#terms what's the problem?

A
Anton R., 2019-08-01
@anton_reut

And what is the tin? Basic knowledge of html, kindergarten.
In the first case, the links will look like this: www.site.ru/#link
In the second case, the links will look like this: www.site.ru/page#link

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question