fisshy / react-scroll

React scroll component
https://github.com/fisshy/react-scroll/blob/master/README.md
MIT License
4.35k stars 436 forks source link

How to scroll to an element defined in dependency (installed in node_modules)? #541

Open evgenyfadeev opened 1 year ago

evgenyfadeev commented 1 year ago

Hi, I have an <Element name='somename'>...</Element> defined in a library.

And In the project using this library - scroller.scrollTo('somename', { smooth: true, duration: 500 })

Scrolling is not working - there is a warning in the browser that the scrolling target cannot be found (even though it is rendered).

Is there a way to resolve this with react-scroll?