I have a useEffect hook which will call DataStore.query() on a Bucket model with a few parameters. On the first page load in a browser, it will always return undefined, even though the data exists. If I refresh the page, it will properly return the object I'm expecting, every time.
The only solution I've tried said to use the Hub.listener() to listen to datastore and only load the page containing the DataStore.query() useEffect hook once the datastore is ready, but that hasn't resolved my issue.