You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 'useSubjects' hook in vue seems to return different data depending on when it is called. This in practice seems to make it rather consistently work on a different subset of the data.
I have made a repo to reproduce this issue that uses the same component twice, the first one is as is and the second one is on a 1s delay leading to this result:
I have only added numbers in the first component and letters in the second but they are both using the same component, subject class, perspective & channel. They consistently load the data like that after a page reload.
From what I have figured out so far is that this line returns the different subset:
It looks like since the perspective & source values are not reactive when passed to the useSubjects hook meaning if the perspective isn't loaded yet it attaches to the source 'ad4m://self' instead of the perspective which leads to the 2 sets of data.
I can get around it for now by passing in computed properties which ensures the hook can pickup on the changes:
The 'useSubjects' hook in vue seems to return different data depending on when it is called. This in practice seems to make it rather consistently work on a different subset of the data.
I have made a repo to reproduce this issue that uses the same component twice, the first one is as is and the second one is on a 1s delay leading to this result:
I have only added numbers in the first component and letters in the second but they are both using the same component, subject class, perspective & channel. They consistently load the data like that after a page reload.
From what I have figured out so far is that this line returns the different subset:
ad4m/ad4m-hooks/helpers/src/factory/SubjectRepository.ts
Lines 189 to 191 in 14af599
The text was updated successfully, but these errors were encountered: