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
very nice tilt component, works very well!
I guess there is a problem while unmounting Tilt. It is possible that some of the delayed executions (via setTimeout/requestAnimationFrame) will be executed after the component is unmounted, which will result in a React warning caused by setState calls.
Something like
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 Tilt component.
I was able to solve this problem by adding some tear down logic:
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 Tilt component.
on reset function
` }, {
key: 'reset',
value: function reset() {
var _this2 = this;
Hi,
very nice tilt component, works very well!
I guess there is a problem while unmounting Tilt. It is possible that some of the delayed executions (via setTimeout/requestAnimationFrame) will be executed after the component is unmounted, which will result in a React warning caused by
setState
calls.Something like
I was able to solve this problem by adding some tear down logic:
Should I prepare a PR?
Thanks!
The text was updated successfully, but these errors were encountered: