Closed vantuan88291 closed 11 months ago
Hey @vantuan88291 - I don't know if I have a great solution for you, but two thoughts:
I'm going to label this as has PR
, because I think https://github.com/mobxjs/mobx-state-tree/pull/691 would be a solution, or close to. Leaving the issue open if/until we merge that in.
I'm going to label this as
has PR
, because I think #691 would be a solution, or close to. Leaving the issue open if/until we merge that in.
Safe to say this should be closed then?
Hey @i-mighty - no, we closed that PR because it's been stale for a very long time and we're about to do some big reformatting here. The issue itself still stands. Here's the details on why we closed that PR: https://github.com/mobxjs/mobx-state-tree/pull/691#issuecomment-1729924874
If you are interested in closing this out, I'd love to review an up-to-date PR to that effect.
Can we close this with this as workaround https://www.npmjs.com/package/mst-async-task ?
@chakrihacker - yeah I feel fine about that! I think we decided to close it out and recommend the third-party solution for now. Good call.
Would be happy to review a PR implementing an integration if someone gets interested in it.
I have flow function like this:
i want to cancel that function when component unmount, cuz that api need to wait for a long time. And i add abort like this:
and in my component will call this function:
React.useEffect(() => { return () => { model.dispose("cancel") } }, [])
but its not working, the api still call after component unmount. Have anyone have any ideal?