Is useFirestoreDocData supposed to be used multiple times with different docRefs? #286
Unanswered
marvinderksen
asked this question in
Q&A
Replies: 1 comment
-
This should be an issue... maybe we should look into this @jhuleatt ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Version info
React: ^16.13.1
Firebase: ^7.24.0
ReactFire: ^2.0.3
This might be a silly question and I'm a newbie to React tbh (my problem might therefore arise from some misuse of React), but here is the thing:
The following component takes an argument which changes according to the user's navigation. It is an identifier towards a single document of a collection.
GIVEN the component was rendered with an argument
documentId
of lets say 'a'WHEN (I navigate and therefore) change the argument
documentId
to 'b'THEN the logged ressource stays the very instance for the identifier 'a'
Now I proceed to switch back to 'a' and then again towards 'b', the logged ressource is suddenly the correct document.
Could someone give me a brief explanation of why this is happening and/or whether I do not use the hooks as intended. Thank you very much in advance!
Beta Was this translation helpful? Give feedback.
All reactions