You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before create this component I make another https://github.com/bySabi/react-router-hash-scroll that do the same on top of react-router Link. The time passed and I though this approach don't make too much sense that's why I rewrote it using anchors <a> tags. Animated scroll is a recurrent issue on react router without a clear solution, see: remix-run/react-router#394, probably due that scroll is a document DOM level stuff, far beyond the boundaries of pureness "React Component".
I don't know what you are trying to do but 'scroll' to a external link isn't possible with React Scrollchor right now. Initially I create this component thinking on landing pages but I open to go more far.
One solution to your use case could be: First load external page using router then scroll to it. If you are working with infinite scroll like page, maybe react-waypoint can trigger react-router page load.
Is you take a look at Scrollchor code, it is really simple and all the dirty DOM stuffs is apart on modules that can be reused. You can create your own solution with it and askme anything about this.
If the anchor is on a different page, is there any way to have it trigger the router?
The text was updated successfully, but these errors were encountered: