-
Notifications
You must be signed in to change notification settings - Fork 159
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
componentWillMount vs componentDidMount #242
Labels
Comments
some issue relative to this. Clean client side minimongo? |
crapthings
added a commit
to crapthings/meteor-rekomposer-demo
that referenced
this issue
Apr 11, 2018
@crapthings PR definitely welcome 😊 |
closing because of [email protected] #273 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/meteor/react-packages/blob/devel/packages/react-meteor-data/ReactMeteorData.jsx#L127
componentWillMount vs componentDidMount
what is different between
if we use react-router or flow-router + react-mounter then we make a subscribe withTracker
when switching route, next component's componentWillMount will happen before previous component's componentWillUnmount. is this a correct behavior?
this will cause minimongo's remain previous subscription's records, it reruns component while previous records are removed one by one.
the ddp message is always show
sub first then unsub
this will cause unwanted rerun, screen flick.
then i try to make a container like what react-meteor-data does then move subscribe to "componentDidMount" and "componentWillUnmount" to stop tracker first and subscribeHandler
the order looks good now, and stop subscribe does what meteor docs said
The text was updated successfully, but these errors were encountered: