-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Dynamic component does nothing if you render it incorrectly #1222
Comments
This is PEBKAC :) The API for server-rendering is Parent.render({
Child
}); I suppose the question here is what should happen when Svelte believes no component has been passed. At the moment it renders nothing (on both server and client); arguably it should at least print a warning in dev mode. Maybe it should even be an error? |
One question before considering that warning/error I guess is whether there is some value in continuing to be able to pass |
aah, I was afraid I'd made some mistake like that 😂 Warning would be nice. I would have actually expected an error while trying to use |
I think I'm going to close this — there are too many situations where you do want the |
Reproduction at https://github.com/TehShrike/svelte-ssr-dynamic-component-repro
Given these two components:
When rendered with this code:
I would expect to get this output:
But instead it renders this output:
without logging an errors or warnings.
The text was updated successfully, but these errors were encountered: