title: How replace componentWillReceiveProps with hooks
body: <p>i wonder how using useEffect like componentWillReceiveProps. </p>
  
  <p>i'm using redux in my react app. </p>
  
  <p>So i have a some redux state when it state updated i wan't to execute some function in my component. When i use class components i did it like that: </p>
  
  <pre><code>componentWillReceiveProps(nextProps) {
     if (nextProps.Reducer.complete !== this.props.Reducer.complete) {
       someFunc();
     }
  }
  </code></pre>
  
  <p>Now i'm using just functional components and hooks. </p>
  
  <p>now my component is like that: I'm trying to do it with this way but not working. Any idea where i mistaken ?</p>
  
  <pre><code>function Component(props) {
    const Reducer = useSelector(state =&gt; state.Reducer);
  
    const someFunc = () =&gt; {
       .....
    }
  
    useEffect(() =&gt; {
      someFunc();
    }, [Reducer.complete]);
  
  }
  
  export default Component;
  </code></pre>