Update data after subscription finishes syncing

Hello, I have a specific document stored in a Config collection that I would like to sync and access when the user first downloads my app. This is my expected flow…

  • User installs the app
  • Subscribe to Config collection
  • SYNC STARTS
  • Document is unavailable. useObject sets the value as ‘null’
  • SYNC COMPLETES
  • Document is available. useObject updates the value accordingly

I would expect useObject to update when the sync finishes. But it doesn’t. Am I missing something here? I’m having to rely on waitForSynchronization() to know when the data is ready.

Please let me know best practices for something like this.

I’ve got a minimum reproducible example here