DEV Community

Discussion on: SolidJS Official Release: The long road to 1.0

Collapse
 
lexlohr profile image
Alex Lohr

I was always a bit wary of transpiling frameworks, because they usually introduce some magic that adds difficulty to understand what happens. The first incarnation of Angular was the worst I had formerly encountered.

With that in mind, I was ready to dislike SolidJS when I found it two days ago.

However, of those frameworks with magical functionality, SolidJS seems to be the most straight forward, one could even say, solid. Even the transpiled code is easily readable. I've yet to toy around with it a bit more, but for now I like it.

Collapse
 
ryansolid profile image
Ryan Carniato

Thank you. The reason for it I think is people were basically hand writing stuff like this a decade back. Solid's declarative structure makes it easier to organize your code, but the compiled output is almost exactly what a human would write to optimize some Vanilla code. There are no classes or lifecycle really, just an event system with some scheduling. The only code that gets compiled is the JSX, so your code remains yours. Brutally efficient, brutally simple.

Collapse
 
lexlohr profile image
Alex Lohr

You're right: I did handwrite stuff more or less like that a decade ago. Since there are not too many ways to manipulate the DOM, the result is mostly the same. Though I have to admit the scheduling is quite clever.

I also like that it is very expressive, like using <For each> seems such an obvious solution once you've seen it.

Collapse
 
barneycarroll profile image
Barney Carroll

Same! When I first encountered Solid, after years of curmudgeonly disdain for the mystifying effect of JSX, I grudgingly admitted to myself: in this particular instance, I can see the benefit.

Really impressive work @ryansolid ! What was it that signalled the culmination of the first major release?

Collapse
 
ryansolid profile image
Ryan Carniato • Edited

Honestly it was time. I was going to do this almost 2 years ago and then people were like you gotta do SSR. Once I looked into it I realized it was a fundamental consideration. So I spent 2 years developing out SSR techniques ensuring support for streaming and Suspense on the server. I was finished that around the new year, it's just taken me this long to finish Documentation. Months.

Thread Thread
 
mtyson profile image
MTyson

You are not alone. The svelte team predicted SvelteKit would be out in weeks instead of months, and here it is a year later with git issues only growing.

Thread Thread
 
ryansolid profile image
Ryan Carniato • Edited

I feel that one especially. I am working on a very similar project and it is an undertaking. The incentive is worth it though. Server rendering configuration and coordination is hard. It is really appealing to have a solution that takes care of those details. I was never one for starters but trying to explain how to get the perfect SSR setup. The problem is there is no one size fits all solution but if we can narrow it down to a couple simple decisions it is hugely beneficial.

Thread Thread
 
mtyson profile image
MTyson

Yeah, writing code that is both flexible enough for in-the-wild edge-cases and simple enough for normal use is damn hard.

It sounds like you have wrestled with the same issues, in particular, the ability to deploy to serverless environments.

I always steered clear of SSR as of dubious worth compared to increased complexity, but then I found Sapper and found I was gaining the simplicity of everything being self-contained, and the SSR benefits.

I'm looking forward to trying out what you've got going for Solid SSR.

Working on an article covering AlpineJS right now. Solid is up next. Good timing with the 1.0 release.

(infoworld.com/author/Matthew-Tyson/)

Thread Thread
 
mtyson profile image
MTyson

@ryansolid , I'm getting started on the SolidJS article.

Thinking about doing a modest question-and-answer with you.

Let me know if you are interested.

Thread Thread
 
ryansolid profile image
Ryan Carniato

Yeah I'd be down to Q&A style. If possible send me a DM on Twitter or Discord.