title: How to re-animate react-spring animation using hooks on button click?
body: <p>Following simple component from the <a href="https://www.react-spring.io/docs/hooks/basics" rel="nofollow noreferrer">official examples</a>:</p>
  
  <pre><code>import {useSpring, animated} from 'react-spring'
  
  function App() {
    const props = useSpring({opacity: 1, from: {opacity: 0}})
    return &lt;animated.div style={props}&gt;I will fade in&lt;/animated.div&gt;
  }
  </code></pre>
  
  <p><strong>Question</strong></p>
  
  <p>How do I animate the <code>fadeIn</code>-effect (or any other animation) again for example when I click on a button or when a promise is resolved?</p>