I have a variable in my react component that simply copies the state and saves it every time a function is run. I use this saved state as a way of generating a new state ran