Closed giapelle closed 2 years ago
Hello there @giapelle we have updated in 2.5.2 a problem that useFind would trigger rerender twice you can see more in here. Maybe @piotrpospiech or @radekmie can tell more precisely why your code is no longer behaving as it was before. I would guess is that it just adds things to the array as it can be seen here) but I'm not that sure
@Grubba27 That's actually a bug that @piotrpospiech and I have to look into. It turns out there are no tests for changing the cursor and we overlooked that case in our tests.
@giapelle for now stick to 2.5.1, please.
Hey, @giapelle, we have published version 2.5.3. Check if everything is fine there! We think we have solved this issue. If it still happening even after having updated to 2.5.3, please reach out here or in another issue, and we will try again to solve this subject. Again, thx a lot for reporting this issue 🙏
This is my custom hook
useResources
:This is the publication:
When using the custom hook in a React component like this...
Changing the value of
worker
the collectionresources
still contains the previous values and the new ones are added to the array. With version2.5.1
everything worked correctly: old values were removed and replaced with new ones.