DEV Community

Discussion on: Svelte/Sapper Issue with Switching Components

Collapse
 
mikenikles profile image
Mike

Thanks for sharing that.

Remember, React didn't have fragments for the longest time and required you to return a single parent element for each component. I don't know the details of the Svelte bug, but worth keeping in mind that any new code base such as Svelte comes with some rough edges.

Collapse
 
bigi profile image
Bigi Lui

I didn't know that part about React and the way you described the problem makes sense that it's a difficult thing to tackle (removing a component that doesn't have a single wrapper element around it) when it comes to DOM manipulation. Thanks!