Post

Still no way to add state? React community discovered long ago that stateless components have very limited utility. The constant conversion from SFC to classes led many to just forgo the former altogether.

If you need state, just use a regular component. Snippets are not supposed to replace components, you can use them to hold SVGs or similar, which doesn't need it's own state.

That's really cool, and I'm sure there are use cases where this will be extremely convenient. But out of the box I find it hard to find an actual use case for it. The demo seems to be a bit of an antipattern (I could achieve the same with simple components). Do you maybe have a real world example?

I saw some people arguing that Svelte doesn't allow export of multiple components from one file. This feature at least goes into the direction.