title: My animation is not working when re rendering my react component?
body: <p>So, my problem is that I have a component, I associated an animation to it and it is working when the component is rendered for the first time, but on an event click I change some conditions and some props associated to this component, But my element is not re rendered, it is just changing what has been changed, that means that the element is not removed from the dom et added to the DOM again, that's why I am not able to see the animation again, so it is not re-rendered or I just did not get what re render  means. </p>
  
  <p>I tried some solutions of course, but I am stuck, I tried to use this method : </p>
  
  <blockquote>
    <p>this.forceUpdate();</p>
  </blockquote>
  
  <p>But again, I am still not getting anything.</p>
  
  <p>I dont think I have to write the whole code I wrote, becuase it is a lot and includes many other things but This is what I think is needed. </p>
  
  <p>methodWillReceiveProps in my component : </p>
  
  <pre><code>  componentWillReceiveProps(props) {
      if (props.isRerendered) {
        this.forceUpdate();
      }
    }
  </code></pre>
  
  <p>props.isRendered is returning true everytime, I checked with some console.log methods.</p>
  
  <p>This is what is rendered : </p>
  
  <pre><code>render() {
      return (
        &lt;div
          className={cs({
            "tls-forms": true,
            "tls-forms--large": this.props.type === "S",
            "tls-forms--medium tls-forms--login": !(this.props.type === "S")
          })}
        &gt;
        // content here 
        &lt;/div&gt;);
   }
  </code></pre>
  
  <p>And here is the sass file and the simple fading animation : </p>
  
  <pre><code>.tls-forms {
    animation: formFading 3s;
    // childs properties here 
  }
  
  @keyframes formFading {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }
  </code></pre>
  
  <p>I will really appreciate any help given.</p>