updated init state.
updated current state and initialize the components.