()
| 2 | import './App.css'; |
| 3 | |
| 4 | export default function App() { |
| 5 | const [styles, api] = useSpring(() => { |
| 6 | return { |
| 7 | from: { |
| 8 | width: 100, |
| 9 | height: 100 |
| 10 | }, |
| 11 | config: { |
| 12 | // duration: 2000 |
| 13 | mass: 2, |
| 14 | friction: 10, |
| 15 | tension: 400 |
| 16 | } |
| 17 | } |
| 18 | }); |
| 19 | |
| 20 | function clickHandler() { |
| 21 | api.start({ |
| 22 | width: 200, |
| 23 | height: 200 |
| 24 | }); |
| 25 | } |
| 26 | |
| 27 | return <animated.div className="box" style={{ ...styles }} onClick={clickHandler}></animated.div> |
| 28 | } |
nothing calls this directly
no outgoing calls
no test coverage detected