Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript #283

Merged
merged 9 commits into from Apr 22, 2020
Merged

Typescript #283

merged 9 commits into from Apr 22, 2020

Conversation

CaptainN
Copy link
Collaborator

@CaptainN CaptainN commented Jan 9, 2020

This PR does two main things:

  • Refactors the hook implementation to separate it into two sub-hooks, one for with deps, and one for without. This makes it much easier to read through the code.
  • Converts the main hook implementation into TypeScript!

Remaining items

  • Finish fixing the tests - I think everything is working, but the tests have gone stale (I'm not sure the remaining broken tests ever worked).
  • There may be some better ways to specify the function signature in some places.

Supercedes #282 (fixes #278) and adjusts tests for changes introduced there.

@CaptainN
Copy link
Collaborator Author

This is basically complete, and ready for review.

  • There is one more warning about a parse error on the first line - I really have no idea why, it seems fine to me.
  • The tests are stalling at a certain point, and I don't know why...

Also updates deps in package.json, removes
@testing-library/react-hooks and makes some minor adjustments to
comments in useTracker.ts
@CaptainN
Copy link
Collaborator Author

Finally got around to fixing the tests (I think I finally got it right - hopefully I won't have to rebuild them again...) - and even added some tests for StrictMode #282. These StrictMode tests could be cleaner/more specific/easier to read - but they do test it, and they are correct.

@filipenevola This is ready for review/release.

@filipenevola filipenevola merged commit dd53fc2 into meteor:devel Apr 22, 2020
@filipenevola
Copy link
Collaborator

2.1.0 of react-meteor-data is published now!

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: withTracker() fails under React.StrictMode
3 participants