Live data from Hacker News

Ask HN: Help me pick a front-end framework

news.ycombinator.com

51–60 of 181 posts

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

#51

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…

I'd agree with all these, but if I understood correctly OP wants to annotate static text rather than edit. OP this is an interesting and rather niche area, you will want to be making use of the selection API[0] and figuring out a good way to make it reactive to integrate with react and your data model. [0]: https://developer.mozilla.org/en-US/docs/Web/API/Selection

Ah, good point, TipTap may be overkill if OP doesn’t want to edit it at all.

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

#52
Svelte / Sveltkit is easy to learn, efficient and separates HTML, JS, CSS nicely (no need to mess around with JSX). It supports Typescript and you get animations, global state etc. out of the box. Downside: it's top notch and thus hasn't the biggest ecosystem yet.

You can also try Flutter for developing mobile, desktop and web apps. It's got Google's backing and is also supported by Canonical for Ubuntu desktop apps.

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

#53
post #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,…

For styling, I've had good success with Daisy UI which is based off tailwind. The author loves svelte even though it isn't svelte specific.

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

#54
post #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.

Yeah, this description doesn't sit with me very well, either. I fully support the argument that Angular is not a good choice because React is more popular and has a larger pool of developers, but not that it is more complex.

I too would like to hear about what complexities you are encountering and if they are incidental or necessary complexities.

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

#55
post #42
post #36

Earlier quoted context omitted.

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.

Can you elaborate on some of your challenges please? I find it quite straight forward to use once you overcome the somewhat steep learning curve.

Sure, the following challenges come to mind:

* Must maintain a deep understanding of RxJS, which is its own beast. Angular team sometimes uses it in "creative" ways that change between versions in creative ways.

* Must not go off reservation (or do) where the Angular code is committed but not covered by documentation (because reasons). Template variables (hack an ngIf into an ngVar) come to mind, as well as how not subclass an abstract component (e.g. abstract component can technically have its own template and interesting things happen when children also have their own templates).

* Must understand how Angular i18n works by inspecting various Angular code repositories (and sometimes having to build the Angular project yourself, inadvertently discovering the "wonders" of Bazel). For example, the list of Angular supported locales is generated from CLDR dumps. CLDR likes to release new dumps and so the list of Angular supported locales changes (sometimes). You can think of interview Angular questions from hell such as what is the default build locale and what happens if you change it to "en-US-POSIX"? Or, my current favorite, how to ask Angular put dir="rtl" into the generated index.html for locales that are RTL?

These are just off the top of my head. I didn't even go into various performance optimization techniques which may or may not be made redundant by the next version of Angular because of their own compiler optimizations. Also, having to make the decision of the E2E testing solution (or sticking with Protractor).

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

#56
> Does anyone still write plain JS

Yes, I'm finishing a game in plain vanilla js :)

For rapid prototyping I'd suggest React. It has the richest ecosystem, already existing knowledge base (SO, blog posts, courses...) and whole bunch of components available.

If you don't have a good sense for UI-s, then try an opinionated one, like Tailwind or one of its alternatives, Google will help find some. It plays really well with React. Pick on that looks the most intuitive to you and has a great component documentation.

Typescript is indeed a good idea if maintainability is a design goal.

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

#57

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…

You recommend Cypress as an "obvious" choice, so I am curious whether you evaluated Playwright. If you did, why you find Cypress to be the clearly superior choice? Genuine question.

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

#58
I've written about this before but I think overall the biggest advantage of React is the ecosystem. It's not the cleanest, fastest, etc. but the size of the community alone makes it worth it.

So yes, I'd recommend React - it takes some time to get comfortable with it but the investment pays off when you can find a lot of snippets of code ready to be used and most of your questions will probably already have an answer online.

Another benefit is that there are very well-established UI frameworks/design systems (Material UI, Antd) with standard components that allow you to build something that "looks good" without you having to worry much about it.

And finally you'll get good TypeScript support with most of the tools in the ecosystem.

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

#59

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…

Concur with these suggestions.

TypeScript + React + a good UI library like Chakra will do most of the legwork for you.

For anything where you need to reach into the HTML/JS/CSS, find the right place in the React lifecycle (usually useEffect, useRef, and callbacks).

Prefer closures (I mean: small, local functions), strictly-typed TS interfaces, and async/await for everything. Avoid classes, fancy patterns, ORMs, function overloading, etc. Keep it simple.

Check out RunTypes for TypeScript. It will make moving data into & out of your codes breeze. Just JSON.stringy on one end and JSON.parse then MyRunType.check on the other end.

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

#60

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…

You recommend Cypress as an "obvious" choice, so I am curious whether you evaluated Playwright. If you did, why you find Cypress to be the clearly superior choice? Genuine question.

Optimizing for community size and simplicity for an outsider.
Post reply on HN