Create a state as isListUpdate with initial value 0. Now, in useEffect block, check if state changes re render the component and again set isListUpdate to 0. You should get the result with this.