Skip to content

Fix useFind#370

Merged
Grubba27 merged 3 commits into
masterfrom
fix-use-find
Nov 9, 2022
Merged

Fix useFind#370
Grubba27 merged 3 commits into
masterfrom
fix-use-find

Conversation

@piotrpospiech

Copy link
Copy Markdown
Contributor

Fix #369

Data returned by useFind wasn't updated if the cursor was changed. It happened because the initial fetch was called only once.

I added the initial fetch also to the useEffect hook. It will be called only if the cursor is updated.

@Grubba27 Grubba27 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think now looks good!
Can I merge & release? or you want to add those tests?

},
})
observer.stop()
if (!(cursor instanceof Mongo.Cursor)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks better than the previous version!
awesome work!

@piotrpospiech

Copy link
Copy Markdown
Contributor Author

I can add tests in another PR in which I will fix the test environment. It can be merged and released.

@Grubba27 Grubba27 merged commit 85c935f into master Nov 9, 2022
@Grubba27

Grubba27 commented Nov 9, 2022

Copy link
Copy Markdown
Contributor

Released 2.5.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

react-meteor-data@2.5.2: useFind stop working correctly

3 participants