-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Attrs Fallthrough #625
Comments
I can't see the warning you are talking about: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<div id="app"></div>
<script type="module">
import {
h,
createApp,
defineComponent
} from 'https://unpkg.com/[email protected]/dist/vue.esm.js'
const Comp = defineComponent({
props: ['foo'],
setup(props, context) {
return () => [
h('div', 'content 1'),
h('div', 'content 2'),
h('div', context.attrs)
]
}
})
const app = createApp()
app.mount(Comp, '#app')
</script>
</body>
</html> Next time, please provide a repro |
ok, i fixed the reproduction code. https://codepen.io/itoito-cn/pen/WNbgrdN it's not make sense if you don't pass any properties when we're talking about arrt fallthrough. -> markAttrsAccessed() is only called from componentProxy |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Version
3.0.0-alpha.1
Reproduction link
https://codepen.io/itoito-cn/pen/WNbgrdN
Steps to reproduce
What is expected?
attrs fallthrough should not warn when attrs is used during render
in this scenario, it's better if we also check the access from setupContext to prevent warning.
What is actually happening?
we don't have any approach to prevent warning if an arrow function is returned as render function within setup().
The text was updated successfully, but these errors were encountered: