DEV Community

Discussion on: Why I moved from React to Svelte and others will follow

Collapse
 
ben profile image
Ben Halpern

I've been thinking it might be worthwhile to use Svelte within DEV in addition to Preact. We choose Preact over React because we want to be minimal with our underlying bundles. The small footprint of Svelte in this regard makes me feel like we can offer up both underlying libraries for our developers to choose from based on preference for different parts of the site without going over our bytes budget.

I like everything I'm seeing about Svelte and feel like we can adopt it without throwing out our other approaches.

Collapse
 
mikenikles profile image
Mike

Right, Svelte fits in well in terms of its bundle sizes.

I haven't mixed (P)react & Svelte components on the same page, but there is an example at github.com/Rich-Harris/react-svelte with Svelte 2.x. Likely a good starting point for an experiment.

Collapse
 
triptych profile image
Andrew Wooldridge

I think that's one of the very cool aspects of Svelte. It doesn't have a ton of baggage with it ( loading a whole lib before you can use it) and you can just sprinkle it in on top of other frameworks / languages and feel confident that it will not interfere or add too much pageweight. It's very "subversive" in that way.