-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Utilize cancellation over isMounted for indicators #2739
Utilize cancellation over isMounted for indicators #2739
Conversation
@@ -16,7 +16,7 @@ const ProgressPage = React.createClass({ | |||
componentDidMount() { | |||
let self = this; | |||
|
|||
let id = window.setInterval(() => { | |||
this.timer = window.setInterval(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about adding it at the top like here https://github.com/callemall/material-ui/blob/master/src/snackbar.jsx#L24?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes!! Definitely, great idea. I'll get done, thanks 👍 👍
@oliviertassinari Take another look. |
That's why |
8d492e1
to
243c9ff
Compare
@oliviertassinari Merge this if all is good. |
@alitaheri That also remove a warning in the doc page. Nice work 👍. |
Utilize cancellation over isMounted for indicators
Thanks ^_^ 🎉 |
IsMounted is going to be deprecated and as facebook guys clearly express, it's an anti-pattern.
Closes #1626 and #2354
A part of #2573 umbrella issue.
@oliviertassinari Take a look 😁