The first log shows that record.isReady is true when it's clearly not. The second log is triggered by whenReady but as you can see the document is still empty so it's not actually ready. The third log is a total mystery why it happens because nothing has changed since the first subscribe event. Only in the fourth log the record contains all the data from the server.
Question: How do I know when the record is truly ready?
Versions:
In this test the
hello-world
record contains a simple object:{hello: 'world'}
. The test file:What I expected to see in my console is the following:
But what I get is this:
The first log shows that
record.isReady
istrue
when it's clearly not. The second log is triggered bywhenReady
but as you can see the document is still empty so it's not actually ready. The third log is a total mystery why it happens because nothing has changed since the firstsubscribe
event. Only in the fourth log therecord
contains all the data from the server.Question: How do I know when the record is truly ready?