top | item 40543790

(no title)

__oh_es | 1 year ago

This has been on my mind loads lately and I’ve been playing with some ideas (ohmybuck.com/2024-05-26-10-51-what-i-want-from-the-next-big-framework/ and github.com/olmesm/hadeda - reviews welcome although they are both rough)

I think there are two main issues with js stacks - react and too much plumbing.

React based frameworks require too much thought about lifecycles and management & synchronisation of client state. RSCs could make this easier, but I think the whole use server/use client is a mistake and pushes the problem onto third party frameworks which aren’t focused enough to close off some doors, in the fear they loose marketshare. Remix and redwood may be on the right track but lets see in the next few months.

Plumbing is an issue because you still end up creating a somewhat separate api that feeds into your components. That wiring sucks time and adds to the maintenance workload.

Adonisjs with htmx and tsx templates feel like they’re the right direction but as another post pointed out, adonis doesn’t quite feel like js.

I think the solution is more magic and conventions like RoR provides. I think more opinion is good here - the wild west needed some law.

discuss

order

0xblinq|1 year ago

I agree Adonis doesn’t feel like js, but guess what, applying rails conventions will lead you to the same problem, it won’t feel as js either.

Also, react has nothing to do with all of this. This is about backend.

Laravel is a great example of this kind of framework, and with inertia you can use react in a sensible way.

And also, htmx is no way the solution to anything g of this. It’s only useful for the minimal examples, you can build anything slightly advanced with it without everything becoming a mess.

__oh_es|1 year ago

My thought was that there is too much focus on react when it comes to js development, and catering for interactivity via react adds complexity that often forces the react frameworks adopt. React frameworks are client state first and don’t have mechanisms to keep server state in sync without requiring loads of plumbing. I feel phoenix liveview solves this somewhat elegantly.

Mind elaborating on why react has nothing to do with this?

I appreciate your comment on htmx - I have yet to work with it on a larger scale.