Use new state function
Better onload