fisshy / react-scroll

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

react-scroll.js target Element not found #572

Closed iamlorddop closed 11 months ago

iamlorddop commented 11 months ago

Hello everyone, for what reason might the target Element not found error appear?

From navigation component:

<li className="header-list__item active">
  <Link to="about" spy={true} smooth={true} offset={50} duration={500}>
    <img src={ AboutImg } alt="О нас" />
   О нас
  </Link>
</li>

And from homepage:

<Element name="building" className="section">
          <Building />
</Element>

Building Component also contains id with its name. I tried to do without id, but it still doesn't work.

Please, help :)

iamlorddop commented 11 months ago

I used react-page-scroller and when I deleted it everthing worked. So, then need to find library like fullpage and not break anything again

iamlorddop commented 11 months ago

Solved