DEV Community

Discussion on: 5 things I love about Svelte

Collapse
 
misterhtmlcss profile image
Roger K. • Edited

I think your first example is incorrect:
<UserInfo {...user}>

I don't know Svelte so I'm guessing, but shouldn't it be like this?
<User {...user}>?

Collapse
 
mauro_codes profile image
Mauro Garcia

Hi Roger! Actually that line is ok, but thanks to your comment, I found other issue.

My import was:

import Info from './UserInfo.svelte';

instead of

import UserInfo from './UserInfo.svelte';

Because I was using it like so:

<UserInfo {...info}/>
Collapse
 
misterhtmlcss profile image
Roger K.

Hmm I think you just flipped my example. It's the same error. Regardless I'm glad to have helped and I'm glad I understood it. Both things I was dubious about when I commented.