Open jonnydungeons opened 6 years ago
I have the same issue
Yes, add an id to that component, and target that one in your scrolling.
@fisshy I was wondering the same as J0NNYZER0.
In case I have a <Link to="someElement">click</Link>
inside one component, and a <Element name="someElement">...</Element>
inside a different component, and I don't want to use animateScroll
, is this possible?
Btw, awesome library 💪 , thanks!
Yes, add an id to that component, and target that one in your scrolling.
This didn't work for me
The following works. Tested with react-scroll@1.7.16
.
// Menu Component
import { Link } from 'react-scroll';
<Link to="section">Section</Link>
// Section Component
import { Element } from 'react-scroll';
<Element name="section"></Element>
I use this component in my menu component to scroll to page content which is in a different component. Is this possible?