react-router-hash-link
react-router-hash-link copied to clipboard
Workaround with React.lazy
The problem is that when the first render there is a Suspence instead of actual Components, so no Hash anchor exists yet. In this case then user comes outside the site he doesn't scroll down to the anchor component.
I tried to add anchors outsite the <Suspence>
<h2 id={'second'}></h2>
<Suspense fallback={<div>Загрузка...</div>}>
<Section2 />
</Suspense>
but no. Any ideas?