Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: findComponent with functional components #238

Merged
merged 1 commit into from
Nov 8, 2020
Merged

Conversation

lmiller1990
Copy link
Member

#187

That was easy 馃 ... too easy ... must have broke something? Heh.

if (node.type === selector) {
return true
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ain't that exactly what's done below, but maybe prevented by the condition?
I think it would be better to just extend the condition so it works with functional component (with some comments if possible)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, I will revisit this logic. The entire function relies on a lot of side effects and mutation (mutating the vnodes array). I think we should consider rewriting it in a more immutable manner potentially 馃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants