Refactored to use the async method instead of getInitialStateAsync