loading...

re: React Hooks vs. Svelte VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Cool that makes sense. So definitely never two components in one file? I've been meaning to try svelte out lately. Just got to find a good project ...

Yes exactly, one component per file. It's an interesting design decision, but I think it's a smart one, because it really minimizes the boilerplate needed. In fact, an empty file is a valid Svelte component!

Yeah usually the only reason why I end up putting two components in one file for react is to avoid having to write those few lines of boilerplate over again. If I don't have to do that then I would be able to stick to the best practice of using a new file for every one

code of conduct - report abuse