Access to initial state in lifecycle hooks

Then set it to state