updates initialState so that it take props into account