|
|
|
|
|
by leppr
2290 days ago
|
|
That's the tutorial challenge code, you get the `svelte:component` solution after clicking "Show me". https://svelte.dev/tutorial/svelte-component But yea that's indeed what I should have done in my example if I wanted the component to be reactive, as you can see that's even more verbose and still doesn't take care of props. |
|
And, isn't it likely this will be easier to support with Svelte eventually? My reasoning is that you just need to add a little syntactic sugar to the language and the compiler can add whatever code is necessary? With a runtime like React and Vue, it seems much harder to add in.