ConsenSysMesh / rimble-ui

React components that implement Rimble's Design System.
https://rimble.consensys.design/
MIT License
462 stars 67 forks source link

react changing state of component when it has unmounted #439

Open maikelmclauflin opened 4 years ago

maikelmclauflin commented 4 years ago

Describe the bug react seems to think that it is changing the state of a component that it has already unmounted not sure if i as the user of the library should be handling this or how it should be handled perhaps instead i should have a provider on a higher level? i guess then i run into the issue of not being able to access the ref

To Reproduce Steps to reproduce the behavior: 1) create a toast message, 2) unmount the component before it the toast message comes up

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Rimble UI Version

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method. in Toast Message Provider (at CreateWarranty.js:90) in div (created by styled.div) in styled.div (created by Box) in Box (created by Card) in Card (at CreateWarranty.js:89) in CreateWarranty (at Business/index.js:31)