You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 10, 2020. It is now read-only.
I had one question, what's the way to 'setState' in function onEnd of Cards component?
The code looks like that in my onEnd():
if (action === 'end') {
this.setState({ users: null });
}
but i had this warning that informs me i updated state in unmounted component (in your SwipeCards):
Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the SwipeCards component.
My point is I want to setState my current component, that contains Cards && Card, in onEnd function to re-render my view with updates without warnings, any idea ? 😃
The text was updated successfully, but these errors were encountered:
atoulous
changed the title
<Cards onEnd={() => ()} />
setState in onEnd()
Dec 4, 2017
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello alex!
Thanks for the package, it's works well for me.
I had one question, what's the way to 'setState' in function onEnd of Cards component?
The code looks like that in my onEnd():
but i had this warning that informs me i updated state in unmounted component (in your SwipeCards):
My point is I want to setState my current component, that contains Cards && Card, in onEnd function to re-render my view with updates without warnings, any idea ? 😃
The text was updated successfully, but these errors were encountered: