how can i get the previous values when using lifecycle hooks, old methods seems like doesnt work anymore