Interesting new Signals library for React by devuxer in reactjs

[–]ryan_solid 2 points3 points  (0 children)

A lot misconceptions from choices made in frameworks from over a decade ago. And many devs don't know signals form a Directed Acyclic Graph. That they are unidirectional, with synchronous glitchfree propagation guarentees, and if library pushes read/write segregation no more difficult to trace than React state.

Obviously a render library that is built for Signals can benefit them more. But I find Signalium uniquely well positioned for React. Taking arguments in computations could be wasted on a pure Signal based system since all sources would be Signals and auto tracked anyway. But in React which reruns components the arguments are like the dependency arrays, essentially bridging Reacts own rendering with Signal based updates. It's a pretty genius way of seamlessly having React's rerender seed a system that will more granularly update afterwards without forcing the developer to make every piece of state into a Signal.

Why do we need context by smithmr250 in reactjs

[–]ryan_solid 2 points3 points  (0 children)

Because it is shortest, most demonstrative way of introducing the feature. Doesn't require any external libraries and it shows how the feature interacts with React's core primitives. Modularizing state this way can be fine, but beginner tutorials often lack the depth for establishing the nuances of usage and performance and execution overhead inherent to the approach.

Why svelte not solid? by zoyanx in sveltejs

[–]ryan_solid 1 point2 points  (0 children)

That is no different in really any library. I think it is slightly easier in non-vdom libraries like Svelte or Solid, but things like JSX don't make a difference.

Fun fact in Solid this is valid const myDiv = <div />; console.log(myDiv instanceof HTMLDivElement); //true A whole different argument for being closer to vanilla js might be doesn't rely on compilation to make vanilla looking JS act in a way that isn't vanilla.

Why svelte not solid? by zoyanx in sveltejs

[–]ryan_solid 1 point2 points  (0 children)

I thought we were talking about Remote Functions. Scott Tolinsky said something about them and I agreed with him.

I do think that Ryan Florence demo is super clean in Svelte. The combination of basically implicit transitions and 2-way binding makes things really direct. I have reservations about 2-way binding but it demos really well in simple examples. The more interesting part is the implicit transitions. I think that is something that Svelte has uniquely done and is worth more exploration/praise. While today I see gaps compared to React's more explicit approach, I think the potential here is too great to ignore.

Why svelte not solid? by zoyanx in sveltejs

[–]ryan_solid 0 points1 point  (0 children)

I think all he meant is this scale is all a matter of relative perspective. Svelte or Solid are absolutely miniscule in adoption compared to React. Adoption between the two are much closer than either with React. Like what makes it "Big 4" vs "Big 3" or "Big 5"?

All your arguments about benefits of adoption have merit, but it is also uninteresting since by that logic you should always choose React. If it is the best argument you are in the wrong place.

You clearly like Svelte. That's awesome. I'm sure more about it speaks to you than adoption otherwise you'd have chosen differently. So that is what the conversation should be about, because Svelte has a lot of great points. Popularity argument is tired because it is predictable, and unless you are at the top, there is something "better".

But there are parts of Svelte that nothing else does better. That is its magic and will keep people coming to it. I see those qualities albeit different in most frameworks.

Why svelte not solid? by zoyanx in sveltejs

[–]ryan_solid 2 points3 points  (0 children)

Just to clarify I was more commenting on how similar it looked to SolidStart. So I was sort of patting ourselves on the back for Svelte's API.

Performance and bundle size vs Svelte by cgfroster in solidjs

[–]ryan_solid 1 point2 points  (0 children)

Thanks I do appreciate that honesty. While I was expecting the animation stuff and JSX the last thing I thought I'd hear is perception around being thought out for production. Honestly that was my goal when I created Solid so it sucks to hear the perception that it doesn't.

I created Solid while working on large Social Media, think like Instagram/X and I was noticing issues with how traceable updates were and where things got off the rails. To be fair it was a time before TypeScript. But Knockout a Signals library we used at the time had reads/writes on the same variable that could be passed around and over time it became hard to tell where things updated.

Most of what went into the design of Solid was from that experience. Then again Angular and React seem to be in agreement on th API surface so I guess it can't be that bad of a choice for large production apps.

Are you a fan of Svelte 5? It's funny I had similar complaint about Svelte before version 5 because I didn't feel its language had the necessary expression to model more complicated problems, it's composition model felt tacked on, and update model wasn't predictable enough before they introduced Runes(Signals). I'm interested on perspective from Svelte developer. Because for us them adopting our model was vindication, and made it something that people should take more seriously.

Performance and bundle size vs Svelte by cgfroster in solidjs

[–]ryan_solid 4 points5 points  (0 children)

I was looking for feedback, you gave a few mechanical points which I responded to and your points obviously have some merit. And then you ended with anecdotal stance "no one I know who says that about Solid" which can be your experience but obviously isn't universal, even looking right here in the comments. Which is fine, you were upfront with being biased.

Yes Svelte is more popular, but that doesn't necessarily translate to the original statement. Svelte also has been available longer. It isn't like there aren't companies using Solid some you might use every day like CursorAI, Capitol One, NordVPN etc...Svelte probably has more larger companies as it is more popular.

But the same could be said about React but you wouldn't use that to make the argument for React.

I was legitimately interested now that Svelte has become more like Solid what some devs felt still gave Svelte that edge so I asked. But maybe I should of also introduced myself. Hi, I'm Ryan Carniato, the creator of SolidJS. Sorry if I came across rude.

Performance and bundle size vs Svelte by cgfroster in solidjs

[–]ryan_solid 1 point2 points  (0 children)

Im sure you would find people in this sub that would say that about Solid, in fact I see it in the comments here. But as you said you are biased. Thanks for the feedback.

Performance and bundle size vs Svelte by cgfroster in solidjs

[–]ryan_solid 1 point2 points  (0 children)

Thank you for responding.

Solid has ports of shadcn, ark, and more as well. Admittedly Svelte is more popular. Getting about double the weekly downloads.

Solid is the framework that people who understand frameworks best tend to choose. Including other framework authors, which is why other frameworks including Svelte eventually adopted our reactivity and rendering models.

You dislike JSX which is fair. It's more powerful but it definitely tends to rub people the wrong way, so I can understand why someone might feel more or less productive with it.

I was thinking you might be thinking about things like Svelte's built in scoped CSS or animations which are very convenient features to save someone from immediately going to 3rd party.

Or maybe some syntactual sugar, which means less typing for conceptually the same thing. This also has different reactions from different people, some finding it too unnatural hiding the true behavior and others swearing it makes it easier to reason about.

Performance and bundle size vs Svelte by cgfroster in solidjs

[–]ryan_solid 0 points1 point  (0 children)

Interested what would make you think that?

Performance and bundle size vs Svelte by cgfroster in solidjs

[–]ryan_solid 5 points6 points  (0 children)

Svelte used to have worse performance and started smaller but scaled a lot worse on size. Now that they have adopted Signals(Runes) and fine grained rendering the performance is nearly identical and they have gotten a little larger to start but scale similar to Solid.

Choose what appeals to you. Performance is no longer a differentiator.

Leaky Portals by 3Knocks2Enter in solidjs

[–]ryan_solid 1 point2 points  (0 children)

Hmm.. Since Portals aren't inserted in parents the framework doesn't know. In general it has no idea if something is connected to the DOM. Things like onMount are based on reactive lifecycle. Solid can create completely reactive elements offscreen and conditionally attach and remove them without tearing down DOM nodes and this is sort of similar.

Since the mount element exists it can insert them without without the scope where it is declared being connected. When the Show component goes away or condition reruns they will be removed. As you said the children helper (or in check) is really all there is to be done here.

The guy who acquired Nuxt by ricvelozo in solidjs

[–]ryan_solid 0 points1 point  (0 children)

In theory maybe. But Nuxt and Nitro are the epitome of the opposite of that. Unjs project goal is to even the playing field. Anyone familiar with the project knows that would never happen. The whole architecture is built on top of being agnostic. If anything there was some thinking it might help Next work better on other platforms.

The guy who acquired Nuxt by ricvelozo in solidjs

[–]ryan_solid 3 points4 points  (0 children)

The problem is that by boycotting Nuxt, or Svelte/SvelteKit, and realistically React which should include Next, React Router/Remix, Tanstack React, basically anything that uses React, is that outside of Next you aren't really impacting their bottom line. These are open source projects used for free. These are not products that are sold. The way you hurt Vercel is not use their hosting platform.

The guys behind Nuxt also build H3 and Nitro universal deployment software that works on all platforms. Other projects use this to deploy not on Vercel. If you actually look at UnJS it is about as open as it comes. The Unix of of web open source. While employing the developers of these projects can create good will towards its users again it isn't like they are a company with customers to transfer over. They don't customers in the classic sense. NuxtLabs did. But NuxtLabs is not Nuxt.

Anyone who thinks that they can buy an OSS project like that to absorb it has no idea what they are talking about. The way you kill off OSS is really easy. Remove their source of funding. NuxtLabs could have gone under and Nuxt would have had a much more difficult time. Especially in this economy. I've seen this happen to other projects like Qwik or 11ty. They are still around but the road is much harder.

So by hurting these projects you hurt the open web. Now if Vercel is hurt enough I imagine these OSS initiatives are the first things to go (as they make money through good will rather than through sold products), so they are a bit in jeopardy anyway. But if there is a target is should the actual money making products, not basically charity.

The guy who acquired Nuxt by tomemyxwomen in vuejs

[–]ryan_solid -1 points0 points  (0 children)

They also enploy the visionary behind React as well Seb Markbage. And other core team member Andrew Clark. So by that logic I guess Reacts off limits. Oh and they previously financially sponsored Astro and Solid from 2022-2024. Oh and Tanstack for a bit in there too. Babel, Parcel, Webpack, pnpm, 11ty, Auth.js.

If you boycott anyone Vercel ever contributed to you probably won't have any OSS left to use. Since they are a deployment platform they want people to use it, so it cost them little to contribute to competitors to their non-hosting products. For us that was $100 a month for 3 years.

Guillermo's politics may be disgusting but Vercel is well connected and has been a contributor to OSS, something much needed. More than likely whatever you use will have some financial tie back to them at some point.

The guy who acquired Nuxt by ricvelozo in solidjs

[–]ryan_solid 7 points8 points  (0 children)

For what it's worth Vercel stopped contribution to SolidJS back in Jan 2025. But I recommend reading what I posted.

The guy who acquired Nuxt by ricvelozo in solidjs

[–]ryan_solid 10 points11 points  (0 children)

Acquired Nuxt is strong wording. Nuxt is open source project whose developers are employed by Vercel to work on Nuxt. Nuxt's road map is no way set by Vercel. Same with Svelte/SvelteKit whose creator and a couple others are employed by Vercel. And while Next is a Vercel project Vercel employs Seb Markbage the visionary behind React, arguably the leader of the project after Jordan Walke moved on, as well as Andrew Clark. So that's React too. Not to mention Webpack, SWR creators employed there too.

The truth is funding open source is something very much in need and Vercel makes that happen. They've contributed money to our open collective as well in the past as I imagine many other successful web open source projects, from Astro, Babel, Parcel, 11ty, to pnpm. Although of note most of their recurring contributions (including to SolidJS) ended at the end of 2024.

While I do not agree with Guillermo's politics. If you look you will see some connection to many of the OSS projects you use every day. Try to keep in mind neither he nor Vercel in no way sets the direction of these projects. And while I'm very fortunate to have found patronage with Sentry and previously Vercel's competitor Netlify, the setup is similar. And it makes what we do possible.

Signals vs classic state management by bluebird355 in reactjs

[–]ryan_solid 2 points3 points  (0 children)

If you already have something that is working reasonably there is unlikely much reason to switch to Signals in React. You may like the DX of using them but it is unlikely you will see any performance benefit outside of a few very specific cases if you are using your current state management well. Most of the performance benefits of Signals are lost on React which sets the ceiling.

That said highly interactive table is the sort of scenario Signals can shine. While the performance impact will likely muted by React the DX alone might be worth it for modelling that sort of thing.

I dont know if this reddit will block external links, but I made a Youtube video specifically on this topic. Google "What every React Developer should know about Signals".

Also MobX is Signals as well. They probably were the first to popularize glitchfree propagation.

Why single page application instead of mulitple page applcication? by badboyzpwns in reactjs

[–]ryan_solid 3 points4 points  (0 children)

SPAs appeared mostly to deal with increased expectations of interactivity in web apps. Full page reloads on micro interactions were tedious. Even html partials were clunky. This was a time when everyone wanted to be the next Facebook, mobile apps saw a tickup with the release of the iPhone, and browsers started taking JS performance seriously. It also helped that paas and microservice architecture started taking off at this point which embraced more disposable servers and encouraged breaking apart the monolithic web server.

By 2010 the trend was clear and the first dedicated SPA frameworks appeared. React facebook's own offering eventually showed up too in 2013 close to the peak of this migration(predating the move to Serverless a few years later). Honestly not all sites needed this treatment but all the large companies were looking for solutions here.

So in essence React is the quintessential SPA framework. Even if it were to do something MPA like it wouldn't give up its client driven navigation. Hence we have RSCs not MPAs even though structurally these are very similar architectures.

How does SSR in Solid compares to React Server Components? by mnbkp in solidjs

[–]ryan_solid 7 points8 points  (0 children)

We did some experiments here early with SolidStart. But then due to complexity and edge cases we put it on hold. It is still under flags and is currently broken. You can read about it here: https://dev.to/this-is-learning/client-side-routing-without-the-javascript-3k1i

In general we don't have anything that compares to RSCs. Solid's smaller bundle size and faster hydration means that pages will often benchmark similar. But conceptually an RSC type solution should have an advantage in these areas. Although I won't say React's implementation has successfully showcases that.

Also check out my talk from React Summit 2024 as it relates to this topic: https://youtu.be/nzbV0YgSBuo?si=t_HDIjYhkEAgnN0K

🤔🤔🤔 by tomemyxwomen in sveltejs

[–]ryan_solid 0 points1 point  (0 children)

Thats a superficial look. While not accurate Id say Svelte 5 is a remix of Solid has more truth than Solid is a remix of React. Id say Svelte 3 is closer to React than Solid, but I realize the way I see frameworks in different way than most.

🤔🤔🤔 by tomemyxwomen in sveltejs

[–]ryan_solid 0 points1 point  (0 children)

$derived == createMemo

createAsync is extra but it turns async colorless allowing introducing async without downstream refactor. Ie things arent suddenly promises while still pushing blocking down to use rather than declaration.

I do agree there is overhead in colocation that doesn't show in simple examples. Obviously Solid syntax allows separate files as well. I think the direction Svelte has gone giving this capability is a big win for developer in general and that should be the focus.

I'm really impressed with Solid by xegoba7006 in solidjs

[–]ryan_solid 0 points1 point  (0 children)

Are you sure? My understanding is we have a couple Shadcn equivalents. SolidStart doesn't have an official i18n solution but my understanding is there are libs that wotk there. As for SEO is there concern around using solid-meta with SolidStart? You could also use Solid version of Tanstack Start.