oldState attribute might be useful