Live data from Hacker News

Ask HN: Help me pick a front-end framework

news.ycombinator.com

31–40 of 181 posts

Re: Ask HN: Help me pick a front-end framework

#31

Html + CSS + Javascript in 2022 is mostly what you need. Unless your job is going to require a framework, it’s really not necessary. Maybe I’m the old curmudgeon who is more concerned about putting out something that works and get customers/revenue quickly, than messing around with the latest Javascript toolchain to ensure it builds in Docker. You csn get a ton done with Javascript and Tailwind or DaisyUI. In fact al…

> Unless your job is going to require a framework, it’s really not necessary.

Respectfully disagree. Mirroring your state in the DOM on your own is incredibly easy to get wrong. Doesn't matter if it's react, svelte or vue, any such framework will greatly simplify the UI parts. Aside from that though, I agree you can (and probably should) avoid most deps.

Re: Ask HN: Help me pick a front-end framework

#32

Sounds like you're in a similar place as me a year ago. Here's a list of tools that I'd use: - TypeScript for language. Gives you an insanely expressive type system that is a step up from Python duck typing (which you seem familiar with after perusing your GH). - React for framework. Frontend experts will shit on it for being non-performant or having a poor UX, but the community is massive and you'll have a ton of su…

For the mobile apps the missing piece of the puzzle is Capacitor.

Also, look for React Testing Library to complement Jest.

Re: Ask HN: Help me pick a front-end framework

#33
If it were up to me, I'd go with the following (mostly based on the largest communities):

- Typescript

- React

- styled-components (I've heard good things about tailwindcss too)

- Jest and react-testing-library for testing

- prettier and eslint for linting

Just throwing it out there in case you'd like to share your code between web, desktop and mobile:

- Electron (desktop)

- React-Native (mobile)

- React-native-web (to bridge it all together)

Re: Ask HN: Help me pick a front-end framework

#34
I think dotnet core with blazor is a good option these days.

- C# can be used for all code, frontend and backend.

- Several GUI frameworks/toolkits to choose from (mudblazor, radzen etc)

- Cross-platform

- High quality development tools from several providers

- Code can later be reused in native applications for most platforms

- Lots of documentation and tutorials available.

Re: Ask HN: Help me pick a front-end framework

#35

I would suggest you to take a look at https://svelte.dev/ . It's fast, has TypeScript support and is very easy to learn. I've been using React for many years, but after trying out Svelte, I am coming to the conclusion that Svelte is much more fun and more powerful. For example, it supports a global store out of the box. On the other side, it's not as mature as other frameworks, probably. Also, in my experience with R…

I have to say Svelte is my first thought, even though it explicitly misses some of the criteria.

There's a lot of criteria in the original question, which will inexorably lead you to React.

But for learning fast from scratch and doing lots of iteration and rewrites on a very complex UI, Svelte is going to provide a leg up.

The biggest issue is finding a UI library you are happy with, and dealing with inevitable Sveltekit changes. I used tailwind and it integrates ok with Svelte. And I've just resigned myself to dealing with Sveltekit updates.

Re: Ask HN: Help me pick a front-end framework

#36
post #27

> Because of limited time, and low confidence in UX design decisions, I would often follow the path of least resistance and the end product would be heavily influenced by the tools I used to build it. Angular with the Angular Material components library would be very "batteries-included". You don't have to decide how you store state, what testing framework to use, etc. Angular provides sane defaults for most things.…

Angular markets itself as a tricycle but comes with a manual in which the first chapter after the introduction instructs you to swap out your wheels for jet engines. The learning curve and hidden complexity is absolutely insane and I would only recommend choosing Angular in extreme cases where you actually need to break the sound barrier.

Source: I maintain a complex Angular SPA since AngularJS/2.

Re: Ask HN: Help me pick a front-end framework

#37
Try Flutter (Dart). Picked it up for a gig this summer. Strong typing, great performance, diagnostic tools are capable, instant hot reload, and it can be compiled for any platform.

The main factor that might make or break it for your usecase is whether it supports the kind of advanced text layout you might need.

Re: Ask HN: Help me pick a front-end framework

#38
My two cents: you have too many requirements that will cause paralysis.

For example, don't worry about the Android or iOS idea yet. You are going to have trouble just getting the basic app done. Do that first and then you will need to throw it away once you understand what you need to build.

If it were me, I would use svelte. Much better than react and satisfies your need for typescript. Use storybook for UI testing, just shift your thinking about that idea...

Re: Ask HN: Help me pick a front-end framework

#39
As a non-web developer who needed to learn a framework that "just works" for a hobby project, I suggest Svelte.

It was very easy to set up (I had previously had yelling and cursing matches with Angular).

Typescript integration is one little script away (and that script is included with the skeleton project every tutorial tells you to use).

Making a UI that "just works" is stupid simple. It's intuitive- easy to throw stuff together, but also easy to make things that scale and compose nicely. Svelte has been the most bullshit-free experience I've ever had in any of my web frontend escapades.

Frontend deployment? scp the build folder onto an EC2 instance running nginx. Done.

For styles? KISS. Use mvp.css. to use it, slap a single line of HTML into the top of index.svelte. Boom, everything is pretty enough that the average user will notice nothing out of the ordinary.

The stack I've settled on for my web projects is this:

- Svelte for the UI/UX.

- mvp.css for all of my styling needs.

- For the database/backend API/etc, Rails with postgres.

- Infrastructure? An ec2 instance. Nginx. Certbot, assuming that counts as infrastructure. Maybe some docker containers if I'm feeling fancy.

With this stack, a single person with very little web experience can have a fully-functioning MVP for a fairly sophisticated service deployed in a couple of weeks. It's unsophisticated, and it probably doesn't scale to a million billion users, but setup is easy, deployment is easy, maintenance is easy, and all of the necessary structure is there to let you scale up to a more sophisticated architecture later.

Re: Ask HN: Help me pick a front-end framework

#40
post #31

Html + CSS + Javascript in 2022 is mostly what you need. Unless your job is going to require a framework, it’s really not necessary. Maybe I’m the old curmudgeon who is more concerned about putting out something that works and get customers/revenue quickly, than messing around with the latest Javascript toolchain to ensure it builds in Docker. You csn get a ton done with Javascript and Tailwind or DaisyUI. In fact al…

> Unless your job is going to require a framework, it’s really not necessary. Respectfully disagree. Mirroring your state in the DOM on your own is incredibly easy to get wrong. Doesn't matter if it's react, svelte or vue, any such framework will greatly simplify the UI parts. Aside from that though, I agree you can (and probably should) avoid most deps.

I found using web components with Lit got me most of the way there to allowing individual components to self contain their state and redraw as required when state changed.
Post reply on HN