Data resource not loading and appearing out of order

In my app, there’s a data variable, newPhoto. It’s a list of objects whose schema consists of a date, id, and image path.

On a specific page, I have a container housing a image component that’s set to repeat with the formula SORT_BY_KEY(data.newPhoto, "date", "desc").

Users can add photos to this list by selecting a button that has the following logic:

I’m experiencing the following issues:

  1. Particular photos not loading
  2. The entire list not loading
  3. Components loading out of order

The first image below is an example of #1 and 3. In the composer, the “Match your photo…” banner is located below the photos container. When no photos load, there is just a blank space where photos would regularly be.

I tried reducing newPhoto’ s delay rate, but that didn’t work.

I’m at a loss as these seem to happen at random times. Sometimes, it will occur when loading the app. Other times, it will happen after saving a new photo to the database. One idea I had is something to do with async functions not lining up properly? But I’m not sure.

Thank you for your help!

Bump. Still would appreciate some help on this as we’re trying to launch pretty soon!