react-router-hash-link icon indicating copy to clipboard operation
react-router-hash-link copied to clipboard

Workaround with React.lazy

Open errand opened this issue 2 years ago • 0 comments

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?

errand avatar Nov 01 '22 14:11 errand