Skip to content

Commit

Permalink
improve example
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasSestak committed May 21, 2021
1 parent d549b87 commit c7d1c17
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions example/src/App.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import React from 'react'
import {config} from '@react-spring/web';
import useScrollTo from 'react-spring-scroll-to-hook'

const App = () => {
const {scrollTo} = useScrollTo(config.molasses)
const {scrollTo} = useScrollTo()
return (
<>
<header id={'id'}/>
<button type="button" onClick={() => scrollTo('#id', 20)}>
<button type="button" onClick={scrollTo}>
Click me!
</button>
</>
Expand Down

0 comments on commit c7d1c17

Please sign in to comment.