-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Detect when dynamic components are in components
and not data
#1039
Comments
Do they have to be in I suppose this might mean components keeping track of all their children, but that might be better in the long run when HMR is introduced (maybe) |
The short answer is 'no', it's not possible. The longer answer: if you had something like this... <VirtualList component={{Item}} height=500/> ...then inside the {{#each visibleItems as item}}
<:Component {component} :item/>
{{/each}} The parent component would have no knowledge that This is one of those things where something that initially seems like it would reduce confusion would end up creating a lot more. It's better if we just have one concept for this, and try and come up with ways to guide people towards the correct understanding — such as a dev-time warning that lets you know that |
detect unused/misplaced components
This is incorrect, but it's not immediately obvious why (it took me a while to figure out).
The component constructors need to be in
data
, notcomponents
— like this. Is there a way to detect that mistake and warn on it?The text was updated successfully, but these errors were encountered: