Live data from Hacker News

Svelte 5 Released

npmjs.com

221–230 of 254 posts

Re: Svelte 5 Released

#221
post #48

Hope it starts to chip into React’s usershare and more companies adopt it, but I know that’s a slow process especially for the big companies. I got out of front end development for most of the years Angular and React have dominated and it looked like a mess, but Svelte and even Astro make sense, maybe I’m just old school. I would totally go back to the frontend with these new frameworks.

I gave React a handful of year to get popular and mature. I tried to approach it an immediately ran into basically endless arguments and bitching about how to manage state. There was no clear winner so I dropped it. Everywhere I landed trying to find advice or best practices just led to more questions. Like WTF? Svelt, Vue3 or hell...Angular, and it's off to the races. I just need to know how to accomplish all the th…

useState has been present in React for years.

Re: Svelte 5 Released

#222
post #139

I've been using Svelte since v3 was released almost daily. I've been using v5 for the past couple of weeks and it's fantastic. The biggest improvement IMO is that you can now write reactive logic intuitively outside your components and it just works without needing to use complex machinery or patterns like Mobx, Redux, or Vuex. I've been doing frontend since the 90s and used everything under the sun. Svelte 5 is the…

You can use reactivity outside components in Vue without Vuex, I don't find it to be much less intuitive than Svelte (which is also nice, don't get me wrong).

You can but it's nowhere near as elegant and natural.

Vue exposes ref(), .value, etc which personally I find to be just cognitive overhead.

With Svelte 5 you just use $state and don't need to care about the implementation details. Furthermore, thanks to the compiler approach, your Svelte code is not coupled with an internal API anymore.

Re: Svelte 5 Released

#223

Earlier quoted context omitted.

> It's hard to wrap your head around some behaviors I've got a React maintenance and development project coming up in a few weeks. I'd love if you'd expand a bit on these points and maybe point to some relevant docs. You could potentially save me days or more of tail chasing. Thanks.

The biggest thing most people don't understand is that React re-renders recursively by default, regardless of whether any particular child component's props actually changed or not. Most of its behavior patterns follow from that one. I have an extensive post called "A (Mostly) Complete Guide to React Rendering Behavior) that covers the concepts and nuances in detail: - https://blog.isquaredsoftware.com/2020/05/blogge…

Thank you.

Re: Svelte 5 Released

#224

Earlier quoted context omitted.

As someone who had to work around the bugs and limitations of IE6 for years in the enterprise, popularity is not a measurement of how good a technology is. The reason React is "embraced" by the industry is that it is widely used, not because it's the best choice. This lowers the risk for companies that can replace its developers with another easily. I'm not saying it's as bad as beeing stuck with a stale IE (yet), bu…

> The reason React is "embraced" by the industry is that it is widely used That looks like tautology to me. What point are you trying to make with this? Comparing IE6 and React is _hardly_ a fair comparison. One was a Trojan horse injected by corporate policies and ACLs, while React gets explicitly chosen by teams. And... Yes, there _is_ a reason why nobody gets fired for choosing React: it's not a bad choice! Is Sve…

I do not hate React and am not the person who made the dumpster fire argument. The original person complained about React, and another person used popularity as a counter argument. That was what I replied to.

> That looks like tautology to me. What point are you trying to make with this?

React is in a place now, where it is the "safe" default choice for Enterprises. It's not necessarily a bad choice, but I argue that risk management is often an important part of deciding which tech to use.

It got to this point by being backed by Meta and was a genuinely good alternative to other frameworks at the time. But it is my view that enterprises prefer React not because it is the best, but because it is good enough and easy to find workers with experience. This is a self reinforcing feedback loop.

I worked in a sales driven startup some years ago and got to shape the technology as the first hire and only developer for a few months. I chose React because it was easier to recruit for and time to market was important. If I had already a team of developers with experience with another framework, I would have chosen that one even if it had been a less popular framework due. Time to market was our main focus.

More established companies don't have the same time constraints and are often more concerned about scaling up with multiple teams. A less popular framework is a bigger risk. It is "easy" to hire 10 people for any framework, but what about 100?

Re: Svelte 5 Released

#225

Svelte. Interesting framework, I dipped into React then tried Svelte and loved it initially - very noob friendly. I really liked having HTML/CSS/Js all in one place. But then tailwind became popular, and I realised I could get this same UX with React + Tailwind. Now I prefer React + Tailwind to Svelte. No Svelte jobs, weird compiler magic. Hated SvelteKit

Can't believe you get downvoted so hard just because you dislike Svelte, is praising Svelte the new PC in Hacker News?

Re: Svelte 5 Released

#226
post #191

Earlier quoted context omitted.

Could you elaborate on why it's dangerous? Aren't runes just proxies with some variables in them?

Of course! I was very used to SPA, and the convenience of moving a rune/store to an external file meant it could be accessed anywhere (as the post said). With SSR however, if you’re not careful, you can easily leak data: https://github.com/sveltejs/kit/discussions/4339 .

Thanks. also this https://github.com/sveltejs/kit/discussions/4339#discussionc...

Re: Svelte 5 Released

#227

I can wholeheartedly recommend Svelte. As someone who can only do vanilla HTML/CSS/JS, it lets me build projects quickly and efficiently without having to learn something complex like React. Case in point this silly side project made in Svelte over a weekend: https://meoweler.com

I found svelte more complicated than react to make work in practice

Re: Svelte 5 Released

#228

Svelte. Interesting framework, I dipped into React then tried Svelte and loved it initially - very noob friendly. I really liked having HTML/CSS/Js all in one place. But then tailwind became popular, and I realised I could get this same UX with React + Tailwind. Now I prefer React + Tailwind to Svelte. No Svelte jobs, weird compiler magic. Hated SvelteKit

Can't believe you get downvoted so hard just because you dislike Svelte, is praising Svelte the new PC in Hacker News?

People are sheep haha, everyone hates react because it’s trendy

Re: Svelte 5 Released

#229
post #159

Earlier quoted context omitted.

> all data manipulation (∆) happens outside of React components, I do something similar. State and its management lives outside the React components, which only consume this state via hooks. Keeping the state in chunks, and outside the tree lets me access a chunk of state only in the components that need it. This results into minimum amount of re-rendering of components. Component code also looks cleaner and easier t…

This many years on and we are still trying to figure out state management. Wasn't React designed for the view?

The marketing has kept changing.

I have always found state management easier in React if I keep it out of React.

Re: Svelte 5 Released

#230

I can wholeheartedly recommend Svelte. As someone who can only do vanilla HTML/CSS/JS, it lets me build projects quickly and efficiently without having to learn something complex like React. Case in point this silly side project made in Svelte over a weekend: https://meoweler.com

> vanilla HTML/CSS/JS ...but that's what Svelte is not . The techniques you adopt won't transfer over to vanilla HTML/CSS/JS without the magic Svelte compiler. These habits will become crutch when Svelte inevitably goes the way of every Javascript frontend framework. > something complex like React React is not that complex, certainly not more so than Svelte. It's hard to wrap your head around some behaviors, but at t…

(caution: backend dev opinion)

I swear every time I use React, every couple of years, I wind up thinking "okay fine, but... why?"

I love JSX. But the React API, for some areas, feels complex and boilerplatey. I dunno why you have to explicitly memoize some stuff. Svelte just magics that shit away.

Post reply on HN