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

fix(jsx): JSX.Element extends VNode #3171

Merged
merged 4 commits into from
Mar 29, 2021
Merged

Conversation

KaelWD
Copy link
Contributor

@KaelWD KaelWD commented Feb 5, 2021

JSX is compiled to createVNode calls, so should be compatible with functions that accept VNode. The functional component tests were invalid because components should return VNodes, I had to add h overloads for Text nodes to keep the same functionality.

image

@07akioni
Copy link
Contributor

Has anyone reviewed the PR? I've met the problem and hope not to write <xxx /> as VNode.

packages/runtime-core/src/h.ts Outdated Show resolved Hide resolved
@HcySunYang HcySunYang added 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. need guidance The approach/solution in the PR is unclear and requires guidance from maintainer to proceed further. labels Mar 29, 2021
@yyx990803 yyx990803 merged commit 4f26835 into vuejs:master Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. need guidance The approach/solution in the PR is unclear and requires guidance from maintainer to proceed further.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants