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.

He want's to be able to define state that's just encapsulated into a snippet rather than the parent. But I don't see why you wouldn't just make a component at that point. SFC have their own benefits so comparing to a react function doesn't make a ton of sense imo.

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.

Yes but that's what I mean. You can find people arguing for any feature you can think of... doesn't mean it's a good idea. Personally I've never had the need to export multiple components; creating Svelte components is so easy! That's why I wonder what a best practice use case would be.