Closed crapthings closed 5 years ago
some issue relative to this.
https://github.com/meteor/guide/issues/33#issuecomment-151716789
Clean client side minimongo? https://github.com/meteor/meteor-feature-requests/issues/242
@crapthings PR definitely welcome 😊
closing because of react-meteor-data@2.0.0 https://github.com/meteor/react-packages/pull/273
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