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

keep reactive computations synchronous with the render phase #1

Closed
wants to merge 22 commits into from

Conversation

menelike
Copy link

@menelike menelike commented Jun 21, 2019

  • rewrite useTracker in order to stay fully consistent with current withTracker behavior
  • compare deps in order to keep API consistency to React.useEffect()

fixes meteor#262

menelike added 2 commits June 21, 2019 18:24
…ithTracker behavior

- compare deps in order to keep API consistency to React.useEffect()
…cker() can be omitted

- also React.memo() already has a check for prop change so there is no need to check for changed deps again
@menelike menelike changed the title consistency withTracker keep reactive computations synchronous with the render phase Jun 21, 2019
menelike and others added 16 commits June 21, 2019 21:02
… change), but allow async and computation reuse after.
# Conflicts:
#	packages/react-meteor-data/useTracker.js
@CaptainN
Copy link

CaptainN commented Jul 5, 2019

This is good to go @yched. It retains backward compatibility with withTracker (or if deps are not specified/falsy), retains the ability to reuse the computation based on deps, and performs asynchronous reactivity if deps are specified. Should be ready to merge!

@CaptainN
Copy link

Any thoughts on this @yched ?

@yched
Copy link
Owner

yched commented Jul 20, 2019

Catching up :-)

Since you opened meteor#271 on the main repo, I guess this PR here can be closed now, right ? (let's not fork the discussion more than it currently is ;-) )

@menelike
Copy link
Author

superseded by meteor#271

@menelike menelike closed this Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants