Hey guys, I am having some trouble implementing this code into hooks:
componentDidUpdate() {
window.scrollTo(0, 1)
}
It properly scrolled to the top on a re-render and worked as intended. I’m now looking through useRef, createRef, and it having to be inside useEffect, just a bit confused on where to go now. Do I have to reference state now? Thanks!
So without updating the location.hash, presumably. Hmm… Let me play a little, see what I can find. Haven’t had as much hooks experience as I’d like, you may have just given me my excuse.