Closed damonmaria closed 5 years ago
@IjzerenHein Are you OK for me to attempt a PR for this? Do you have any suggestions / comments / ideas regarding this suggestion?
@damonmaria Yes, please go ahead, I forgot to get back on this. I do have one concern though. Maybe it's just my gut feeling and I'm totally wrong, but I think that the actual cause of the problem at hand is somewhere else, and solving it here may not be the right place. I think that solving the problem at the source would yield better results with less possible side effects. E.g., by making a copy of the data when you show the form.
After some refactoring the need for this has gone away... so you were exactly right.
I'm creating a
Document
inside an@computed
property. I don't want the doc to update with changes (it's theinitialValues
passed to a redux-form and I don't want it changing when the form submits and updates Firestore). So I need to put themode
tooff
and thenfetch()
it. But I can't do thefetch
when creating the doc (it's in@computed
so bad idea) so I instead need to have anautorun()
to load it:Am I missing some better way to do this? If not...
Could we have a mode called something like
once
that is likeoff
but also eagerly fetches the snapshot? That way I could create it and use the Document'sisLoading
anddata
just like in other modes.