Package Exports
- @dh-react-hooks/use-scrollto
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@dh-react-hooks/use-scrollto) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@dh-react-hooks/use-scrollto
reast hooks for scrollTo
Installation
npm i @dh-react-hooks/use-scrollto
Arguments
props | type | required | default | description |
---|---|---|---|---|
x | number | true | undefined | pixel along the horizontal axis of the document |
y | number | true | undefined | pixel along the vertical axis of the document |
Way to Ride
- Common jS
const useScrollto = require('@dh-react-hooks/use-scrollto')
const scrollto = useScrollto.default(x, y)
- ESM
import useScrollto from '@dh-react-hooks/use-scrollto'
const scrollto = useScrollto(x, y)