Cheers for publishing this - was having trouble getting anything else working with gatsbyjs.
If an anchor link needs a custom onClick handler for some secondary side effect like updating state in a parent component it's overridden by the smooth scroll handler, this just adds a check and calls the onClick from props if found at the end of the smoothscroll handler.
Cheers for publishing this - was having trouble getting anything else working with gatsbyjs.
If an anchor link needs a custom onClick handler for some secondary side effect like updating state in a parent component it's overridden by the smooth scroll handler, this just adds a check and calls the
onClick
from props if found at the end of the smoothscroll handler.