move the react part of the progress bar to a side effect