Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to make navbar links scroll to component react

import React, { Component } from 'react'
import { Element } from 'react-scroll'

export default function () {
  return (
    <React.Fragment>
    
      <Element id='example-destination' name='example-destination'>
        // wrap your content in the Element from react-scroll
      </Element>

    </React.Fragment>
  )
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #navbar #links #scroll #component #react
ADD COMMENT
Topic
Name
7+9 =