userState and newName is undefined