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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: handle fallthrough attributes in built-in components consistently #11140

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ferferga
Copy link
Contributor

@ferferga ferferga commented Jun 14, 2024

This is a naive approach for vuejs/rfcs#664

Why it's naive?
Given Suspense and Teleport are not "real" components but abstractions for Vue's renderer, this is probably not the best approach because:

  • Props are manually handled and defined in a top-level array in the module definition, unlike Transition and KeepAlive which use a normal setup context
  • The fallthrough is manual, which means that might be slower than the already really audited renderer and it might not take into account all edge cases when updating
  • Forcefully needs to use cloneVNode as, we're doing a workaround around the "workaround" that these 2 special components are.
  • Warning Extraneous non-props attributes were passed to component... will still be displayed during development, given componentRenderUtils is unaware that we're "hacking" this already manually.

See also the comment I added to the codebase.

I'm leaving this open as a draft to gather feedback and some insights in how this could be done better, so later on I can keep going with Teleport, TransitionGroup and tests.

Checklist

  • Suspense
  • Teleport
  • TransitionGroup
  • Unit tests
  • E2E tests

Signed-off-by: GitHub <noreply@github.com>
@ferferga ferferga changed the title feat: handle fallthrough attributes in built-in components feat: handle fallthrough attributes in built-in components consistently Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants