-
Notifications
You must be signed in to change notification settings - Fork 42
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
enhance viewport detection performance #31
Conversation
e5bd825
to
588fe78
Compare
👍 |
CLA is valid! |
@@ -55,6 +55,7 @@ module.exports = function clickHandler (e) { | |||
var isRedirectLink = isDefaultRedirectLink(target); | |||
var isPreventDefault = true; | |||
var props = self.props; | |||
var followLink = props.followLink || props.follow; |
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.
Need to check whether props.followLink exists, before falling back to props.follow. i.e. if props.followLink
is false, should just return false, instead of checking props.follow again.
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.
updated :)
06be3dd
to
588fe78
Compare
Hi @lingyan I updated, if there's no other concern I will merge this and release a new pkg today :) |
Go ahead 🚢, since @redonkulus has reviewed other changes :) |
813b7e7
to
ca85c80
Compare
enhance viewport detection performance
all
components, which might hurt the performance on page-init, change the implement here. For page init case, we recursively check viewport from the root, and break as long as the node is not in the viewport.fluxible-router
better@redonkulus @lingyan