+ 2

Link to unrendered element in react.

In a react app, I have a page called "Images" which has an element <h1 id="title>Images</h1>. I want to travel to this specific element when I visit the page from the homepage. I tried using <a href="./Images#title">, but it does not work, as the h1 element is rendered AFTER the page is visited. Any ideas?

6th Nov 2023, 10:27 AM
Nor'wester šŸŒŖļø šŸ‡§šŸ‡© (INACTIVE)
Nor'wester šŸŒŖļø šŸ‡§šŸ‡© (INACTIVE) - avatar
4 Answers
+ 3
Bob_Li already using it
6th Nov 2023, 11:15 AM
Nor'wester šŸŒŖļø šŸ‡§šŸ‡© (INACTIVE)
Nor'wester šŸŒŖļø šŸ‡§šŸ‡© (INACTIVE) - avatar
6th Nov 2023, 11:04 AM
Bob_Li
Bob_Li - avatar
0
maybe you're using it wrong... a forgotten import/export, wrong filepath or a typo somewhere...
6th Nov 2023, 11:26 AM
Bob_Li
Bob_Li - avatar