Open zeroasterisk opened 7 years ago
Also getting this when using a controlled component and someone types quickly.
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.
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.
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).
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.
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.
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?