As a software developer, I have learned and worked with both React and Svelte. Let's explore the pros and cons of React versus Svelte.
React's Strengths
React has been around for a while unlike Svelte which is relatively new. This results in:
- A significantly larger ecosystem when working with libraries than Svelte. Finding libraries to achieve specific functionalities in Svelte can be challenging.
- React is highly sought after in frontend development roles.
Svelte's Strengths
Svelte is much easier and fun to use than React which means that
- You can get from an idea to a working prototype faster in Svelte than in React (This makes it useful for backend developers)
- Working with the DOM is easier in Svelte thanks to element bindings unlike in React with the cumbersome
useRef
hook - Svelte is much faster since it has a compiler.
In conclusion, While React is a staple in the industry, I find Svelte's simplicity and speed to be a refreshing and efficient development experience.
What are your thoughts on React and Svelte?โญ
Top comments (6)
I concur wholeheartedly. However, I don't find the ecosystem to be too lacking. I have found most of what I have needed. The one thing I definitely needed at work was an advanced table component, which I ended up doing and sharing with the community for free. Mine is not the only one, though. There are several others. I just had very specific needs at work.
That stopped me last time I was selecting a framework for a major project... It's great news that these things are being addressed!
What? A table component? There are several now. Everyone except mine provides pagination and use TailwindCSS. Mine is just the table and tries to be appearance-neutral. Trying to be appearance-neutral is one of the main reasons I opted out of pagination, search, etc.
Yeah โจ๏ธ
Since using the dom in svelte is very easy,
You can use vanilla js libraries or build them from scratch yourself
Here's your translation:
"My man, Svelte is a treasure. I just launched lalye.com with Svelte, Bun, and Supabase, and honestly, for me, it's easier to create an MVP with Svelte than with React, especially in terms of speed."
That's very true. I found achieving certain functionalities extremely easy in svelte than in react โญ๏ธ