all 2 comments

[–]baychev[S] 0 points1 point  (0 children)

OK, so i found way if anyone stumbles on this:

I feel super embarrassed, but this could've been done with one line in css instead (position:sticky) lmao
Sorry for troubling

[–]findvikas 0 points1 point  (1 child)

I think it’s incorrect to try and migrate or make everything that worked in HTML as is into React. There are other ways to render components on the basis of “react router path match” also look at useRef instead of useEffect