-
Notifications
You must be signed in to change notification settings - Fork 13
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
[TAS-158] ✨ Revamp index page #1288
Conversation
082f491
to
d177286
Compare
4b86a18
to
d177286
Compare
src/pages/index.vue
Outdated
@@ -1457,10 +1457,15 @@ export default { | |||
}, | |||
}, | |||
mounted() { | |||
window.addEventListener('resize', this.handleResize); | |||
this.resizeListener = window.addEventListener('resize', this.handleResize); |
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.
Should define resizeListener
in data
?
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.
I think no need to put it in data for reactivity
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.
Best to define it somewhere clearly as a class atteibute though
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.
Defined in $options
src/pages/index.vue
Outdated
this.handleResize(); | ||
this.animate(); | ||
}, | ||
beforeDestroy() { | ||
if (this.resizeListener) { | ||
window.removeEventListener(this.resizeListener); |
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.
Best to set this.resizeListener
as null after removing it
No description provided.