Closed CaptainN closed 4 years ago
@CaptainN Not wanting to put additional work on your shoulders, but the bug you described cries for a proper unit test, WDYT?
@menelike Yeah, It's on my list. I first have to get the tests working again (preferably on the typescript branch). I mostly have them working, but TinyTest is kind of flaky.
This patch changes the behavior of useTracker
and withTracker
enough, that I think it should get a minor version bump if this patch is accepted. (This patch is also wrapped in to the typescript conversion.)
When the hook is used without deps (including through
withTracker
), the component will not update correctly on the second render. This PR solves that by always forcing render after the render is committed inwithTracker
.