Live data from Hacker News

Ask HN: Help me pick a front-end framework

news.ycombinator.com

91–100 of 181 posts

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

#91

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 Svelt…

No more dealing with SvelteKit changes, we've hit RC! :)

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

#92

I agree with the comments saying you should use React. I always come back to it and never regret using it. That said, there are some time killers you might not be anticipating up front (and this is true of basically whatever framework you use). You will jump right past a ton of frustration and fatigue by using a starter template such as create-react-app, next.js's starter script, or remix.run's starter script. This s…

Prisma and NextAuth.js are first class modern Typescript replacements for Django’s ORM and auth respectively. Django’s only competitive advantage is its Admin and common convention.

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

#93
"prototyping quickly" and "quick rampup" are for me a bit contradictory to "weak typing is a deal breaker". If I do not have to define types for everything, I am WAY faster with my prototypes.

Also given that it is frontend land, I am not sure any of the tools now available will be available (and compatible) in 10 years. And because it is a side project I would not spend one second worrying about 10 years from now.

HN will not tell you what you will like. Every now and then a question like this is asked and people just tell OP the tools they currently use.

I guess it would be best to create a mini app (reading a list of things from a backend and render it and maybe delete something from the list) in two or three frontend frameworks and then choose the one that felt the nicest for you.

As for design I guess Tailwind CSS is something for you. It is easy to make web sites that look nice. (All tailwind CSS sites look kind of the same, but this is OK)

Good luck with you project!

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

#95
Next.js (React framework), Tailwind CSS, NextAuth.js, React-Query (tanstack/query).

These are the current most well regarded and largest traction Typescript projects on the frontend.

Then, if you don’t need server-side state, your entire backend can be run from Next.js serverless and Prisma ORM.

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

#96

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…

I'd add to try using sveltekit. Typescript is already supported when you set it up using the documented "npm create svelte@next". It has cool routing, backend etc but even if you don't care about any of it, you get free hot reloads. And with the new version, you can create it as if it was your average svelte app, just avoiding + in file names and using +page.svelte as your main entry point. For styles, if you care ab…

I love Svelte and SvelteKit but if you're just interested in building your app, please pick something else for now. It's still constantly changing and while it's good it's being developed rapidly, it's definitely not something you want to spend your limited time on migrating while you could just be productive with say React.

Okay sure, they have had big breaking changes in-between major versions as well, but before SvelteKit hits v1.0 you're better off using something more stable. Later you can certainly choose to migrate as the core logic probably is not that complex. If you're using rich-text editing capabilities however, React is more supported.

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

#98

If you want something that has tons of help, e.g. in stackoverflow, I'd recommend React. The next best framework seems to be Next.JS, that will come after React. React has no performance issues at all, only for those who don't understand keys and how rendering works, or how to separate API calls for an async data flow. Hot take, but imho, typescript is overrated, I can tell you how many times I had a TypeError on pro…

+1 for Nextjs. Productivity is really high when using Nextjs. Deployment is a breeze too. You can't go wrong with next.

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

#99

Earlier quoted context omitted.

Thanks for the answer! I'm probably personally leaning towards using Playwright for future projects, reading that. I believe Playwright may be passing Cypress in community size, and simplicity is subjective. They both look quite similar, from this outsider's perspective.

Being someone that has recently evaluated the space and chosen Cypress I am curious why you think the community for Playwright may be passing Cypress? That name didn't even come up in my search while I found tons of blogs, discussions, walkthroughs, and discussion around Cypress. So many in fact I walked even confident I had chosen the 'easiest' tool where I classify easy as how hard it will be to find help when I am…

Sure, I can clarify.

1. I know GitHub stars aren't everything, but Playwright has 41.9k at the moment, and Cypress has 40.5k.

2. Playwright is backed by Microsoft, and given how happy I've been with how they manage Typescript, that makes it a pretty safe bet to me.

3. Cypress is much older, so I discount a lot of the blog posts in my evaluations. In fact, I count such things against it sometimes, because oftentimes when I'm hunting for a solution to a problem, all I can find are outdated answers. I run into this a lot with AngularJS and Angular.

4. Playwright is included in most of the recent comparison articles I've run across. I don't really keep track of these, but searching again I quickly ran across 2 examples:

  * https://blog.checklyhq.com/cypress-vs-selenium-vs-playwright-vs-puppeteer-speed-comparison/
  * https://www.testim.io/blog/puppeteer-selenium-playwright-cypress-how-to-choose/

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

#100

I agree with the comments saying you should use React. I always come back to it and never regret using it. That said, there are some time killers you might not be anticipating up front (and this is true of basically whatever framework you use). You will jump right past a ton of frustration and fatigue by using a starter template such as create-react-app, next.js's starter script, or remix.run's starter script. This s…

Prisma and NextAuth.js are first class modern Typescript replacements for Django’s ORM and auth respectively. Django’s only competitive advantage is its Admin and common convention.

Prisma is pretty good, but the migrations system doesn't really compare. If your answer to many (any?) migrations is "blow away the existing database", that's not gonna work for me. Another thing that's not gonna work for me is generating each migration by hand with SQL specific to the dialect that youre using in development, now that I'm spoiled with Django's auto-migrations. I've had good success with Prisma by using Django to simply manage the schema and using `prisma pull db` (though Prisma unfortunately errors if you are using the default type for primary keys, AutoBigInteger because it can't handle BigNumber). Prisma is basically the ORM I had in mind when I said "there has been work in this space", FYI.

I have only used NextAuth a tiny bit, but it wasn't clear to me how to, for example, extend the user model to add fields to users. I would appreciate it if you have any resources you could point me to for an example or explanation on how to achieve that. I also did not find documentation about how to add my own authentication adapter (or plugin or whatever language they use).

Post reply on HN