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

Error: Tyring set data after component(Container(ChartData)) has unmounted. #152

Open
zeroasterisk opened this issue Jan 31, 2017 · 6 comments

Comments

@zeroasterisk
Copy link

I keep seeing this error, for a dataLoader function which is very fast.

Is there a chance the dataLoader is trying to set the data into the component before it is actually mounted?

@davidworkman9
Copy link

Also getting this when using a controlled component and someone types quickly.

@Dartv
Copy link

Dartv commented Feb 6, 2017

Not sure about v2 but if you look at the code in v1 it actually sets data in constructor and not in componentWillMount which will cause errors if you try to dispatch some redux actions there. Maybe it's related to this issue.

@flippyhead
Copy link

Anyone happen to figure this out? Following the recommended setup we see this after routing (with react router) and it causes the app to completely break.

@flippyhead
Copy link

Actually we found this was caused by the mapper function for redux not returning the result of subscribe (which is a function that unsubscribes from the store).

@kieckhafer
Copy link

Any solution to this? We are also seeing this issue. We have a sidebar that has our komposer container inside of it. When we close the sidebar, the container seems to re-render as it's closing.

In our container, we fetch our data via a Meteor.call. This call is seeming to happen again during this re-render when we close our sidebar, and I assume the component is unmounted before the data is sent back, causing this same issue.

If I provide static data, instead of doing the Meteor call, then everything is fine.

@McPo
Copy link

McPo commented Aug 16, 2017

I am also running into this issue.

Here is some pseudo code.

const exampleComposer = (props, onData) => {
	doSomething(() => onData(..));
	return cancelDoSomething;
};

I am making a network call in doSomething. If I navigate away and the component becomes unmounted, I would be expecting cancelDoSomething to be called, but it appears that it is not. (I have verified this via logging). Instead I am getting the following error.

Error: Tyring set data after component

The solution for me at the moment, is to just catch the error that was thrown. Which isn't great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants