4 ms·
So in mid-2023, if not React, what would HN choose?
by mft_ 3y ago
So in mid-2023, if not React, what would HN choose?
- kmlx 3y agofor a small project i would choose vanilla. vanilla is good enough today, tons of features supported on all the browsers, etc etc but for a large project still react.
- tehbeard 3y agoehhhh. I'd think maybe lit-element if you're going to be leaning on Web Components to smooth some of the edges of "vanilla".
- pjmlp 3y agoAt work, whatever the FE team decides upon, React/Nextjs, Angular and Vue are the only relevant ones. Privately, I always go with vanilajs.
- mhoad 3y agoLit.dev has been nothing but great for me. Strong recommendation.
- reustle 3y agoI used on a project 6~mo ago and struggled quite a bit to get some basic things to work. Iirc it was related to event handling on nested elements in a component. I believe I felt quite forced to make lots of very tiny components, which made the "try it out" phase quite frustrating. Do you have any recommended learning resources on building with Lit?
- ed_ 3y agoMithril.js, for both work and personal projects. There hasn't been a major release since I started using it ~4 years ago, which is lovely in the otherwise churning sea of frontend development.
- hasanhaja 3y agoSolid as a React alternative, and Astro as a Next.js alternative. SolidStart is pretty cool, but I like the flexibility of Astro
- tjpnz 3y agoIf it's an internal app, server rendered HTML and maybe a JS library to render charts. Django or Rails both fit the bill.
- vallanceroad 3y agoGenuine question from someone who's only worked in CSS-in-JS or SCSS preprocessors for the past ten years -- what would you choose for styling?
- pweissbrod 3y agoI'm curious if anyone else is advocating for HTMX as a mechanism to simplify bloated front end code bases
- erikcw 3y agoI’ve been using it to great effect for the last year or so. It really is a breath of fresh air. In my case, I’m using a Django backend, but there are lots of successful folks using other backend stacks as well so choose what you know best. The book is a really quick and easy read. It’s pretty eye opening how productive, and effective, htmx can be with so little magic. https://hypermedia.systems/ https://hypermedia.systems/
- em-bee 3y agoi like aurelia because it has a minimal footprint on my code. i set up routing with the views available and i write a class for each view. there is practically no boilderplate code. (eg what is $scope in angular is simply the class object itself in aurelia) any class level function and variable is automatically made accessible from the html template. classes and templates are linked by sharing the same name: welcome.html, welcome.js, export class Welcome ... while in angular you have to declare everything explicitly, aurelia mostly just figures it out by itself.
- tored 3y agoPHP with server side rendered templates.
- seabass-labrax 3y agoI'm seriously looking into Preact[1] as a library which is philosophically aligned with React, fits in nicely with the rest of the JavaScript ecosystem, but has a very small footprint for what it provides (3KiB). [1]: https://preactjs.com/ https://preactjs.com/
- tehbeard 3y agoMaybe it's changed with more recent version but that small footprint was a trap for us. We picked it for that, and ran into weird edge cases / bugs in preact projects using third party libs that didn't occur with react.
- seabass-labrax 3y agoThanks for the warning, although in my case I'm not planning to use any third-party libraries except maybe some fundamental ones like Hammer. :)
- shmde 3y agoSome niche ass framework with little to no eco-system. Or plain javascript by people thinking the web is used to display a single page worth of content.
- pie_flavor 3y agoIf you don't already have a backend framework, I see no reason to disagree with TFA's recommendation of Svelte/SvelteKit[0]. It's simple, there's no runtime framework magic to debug, everything works exactly like you assume it does, it's pretty darn fast, and the DSL syntax isn't easily confused for the HTML it's templating (looking at you, Vue). If you do have a backend framework, then having the backend drive the dynamic updating is a pretty great way to go, so HTMX[1] is the least obtuse way of putting the most power in the hands of the backend. Really makes 'a light sprinkling of JS for interactivity' closer to reality than vanilla JS allows, without adding cognitive overhead. [0]: https://svelte.dev/ https://svelte.dev/ [1]: https://htmx.org/ https://htmx.org/
- masterofmisc 3y agoEhhh. React of course! Well, for me anyway.
- mcv 3y agoIf I had to choose a frontend framework right now, I'd probably go with Svelte. That was my opinion before I read this article, and this article confirms it.
- dahwolf 3y agoNot sure, the typical HN user has JS disabled.
- deleted 3y ago[deleted]