Live data from Hacker News

Ask HN: Help me pick a front-end framework

news.ycombinator.com

161–170 of 181 posts

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

#161
I built a text annotation tool recently, first in React before rewriting it in Svelte. I found React's virtual DOM annoying, esp. when dealing with text selections + wrapping those selections with elements, etc. Svelte was just simpler in this regard (and overall, IMO).

But if you're not a frontend dev and want to use lots of off-the-shelf components, Svelte's ecosystem is much smaller than React's, so you won't have access to full-featured component libraries like MUI, Chakra, etc. Additionally, Typescript support is stronger in React (it's mostly there in Svelte, but lacking in some areas [1]).

For both React and Svelte I found XState helpful to manage annotator state. It might not be necessary if your app isn't terribly complex (in particular, Svelte's built-in stores can handle complex state well), but I've found it a good way to think about state+events and more confidently make changes as a result.

1 - https://github.com/sveltejs/svelte/issues/4701

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

#162
post #96

Earlier quoted context omitted.

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

SvelteKit has indeed undergone a bunch of changes (and like others mentioned is now in the RC phase), but I just wanted to mention that Svelte itself has been very stable since v3 came out a few years ago.

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

#163

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 have to disagree with the Typescript part. Granted, it's not a bad suggestion, and there's a lot that's good about TS, but this isn't what I would consider a good place for it for a few reasons. TS, in my experience, has limited benefit when it comes to building a UI, and frontend JS is heavily married to UI programming. For guaranteeing UI functionality, writing years is a better use of one's time. What's more imp…

I agree with you - with the premise of many years of development JS is a much better fit for manipulating the DOM. ClojureScript also accomplishes an isomorphism with what it represents under the hood while being dynamically typed and it seems like people enjoy that DX too.

For a beginner, my experience is that TS is a good way of discovering and working with the complexity and feature set of HTML and web browsers.

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

#164
frontend

- react or svelte

- preact or raw html/css/js if it's simple

backend

- go or python (go std lib is faster but harder to write complex queries in since the extant query builders/orms aren't as mature, django is easy and scales across a team)

- maybe node or deno if you prefer js syntax

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

#165

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 have to disagree with the Typescript part. Granted, it's not a bad suggestion, and there's a lot that's good about TS, but this isn't what I would consider a good place for it for a few reasons. TS, in my experience, has limited benefit when it comes to building a UI, and frontend JS is heavily married to UI programming. For guaranteeing UI functionality, writing years is a better use of one's time. What's more imp…

IMO if you are using React, you absolutely should be using Typescript for UI on non-legacy codebases. There is most certainly a learning curve in understanding why Typescript seems to show you errors in your UI code, but once you understand the ~5 most common errors it becomes much, much easier to use Typescript instead of JS. I simply won’t use React components (or other libraries for that matter) from NPM if they don’t have Typescript typings (or if I can’t easily create an abstracted shim over the untyped code).

The benefits to using Typescript are immense.

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

#166

Earlier quoted context omitted.

I have to disagree with the Typescript part. Granted, it's not a bad suggestion, and there's a lot that's good about TS, but this isn't what I would consider a good place for it for a few reasons. TS, in my experience, has limited benefit when it comes to building a UI, and frontend JS is heavily married to UI programming. For guaranteeing UI functionality, writing years is a better use of one's time. What's more imp…

Sorry, I have to disagree. I used React before with JS and moved to TS, and the difference is just night and day. Forgot a prop? Wrong parameters in a function? Forgot to import a component? TS catches all these while JS doesn't. What problems specifically do you have with TS on the frontend?

Spot on. 3 years ago I threw a huge tantrum and almost quit my job because they forced us to use TS. Today, I would never code for more than myself without TS. I see it really as more of a "contract system" than a "type system" and that's the real subtle genius of it.

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

#167

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 have to disagree with the Typescript part. Granted, it's not a bad suggestion, and there's a lot that's good about TS, but this isn't what I would consider a good place for it for a few reasons. TS, in my experience, has limited benefit when it comes to building a UI, and frontend JS is heavily married to UI programming. For guaranteeing UI functionality, writing years is a better use of one's time. What's more imp…

Strongly disagree. TS is very useful for UI, among other things, especially for lots of throw-away or prototype code that changes fast quite often. TS makes it really painless to move and change things around, as opposed to plain JS where things will break quite often on runtime.

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

#168
post #149
post #104

Vue2, Vue3, or React. React has a larger community but requires you to make a lot of decisions yourself. Also well integrated with Typescript. Vue2 is the only of these three that can be added to a webpage with a script tag. In that sense, it is a lot more simple than the other options. Still a pretty big community. Typescript integration is meh. Vue3 is Vue2 with better typescript integration but with tooling a bit…

> Vue2 is the only of these three that can be added to a webpage with a script tag. In that sense, it is a lot more simple than the other options. Is that really that big of a differentiator? I definitely see the appeal especially in getting stuff out the door quickly, but I wouldn’t consider it in a comparison.

It was to me. And a good portion of Vue2 frameworks were built with that in mind, which is kinda nice.

I know the other poster said you could so react with a script tag... just looked and apparently it is possible... but I don't know many people who use it that way. Something new I learned though.

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

#169

I’ll recommend two paths… Working alone, there is no easier setup than Laravel and (probably for you) Vue + Inertia. Vue is a major player with lots of available packages and it’s pretty simple to get setup with Laravel for a database and backend. If you need help getting started, Laracasts is unmatched in terms of tutorial quality. The other path is to use React. If you think you want a job in front end development,…

There's also livewire plus filament admin on the backend. Makes coding a breeze.

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

#170
Do not over complicate your stack.

It will happen on its own.

Building product is part product and part distribution (customer acquisition).

The more established or boring tech you use, the more time you have to understand the problem and needs and iterate more often and quicker. Often just using what you know isn’t as bad idea. It will shed a light on where you wanna be with your final tech stack anyways. Customers generally don’t care what you have coded their solution in.

Your goal is more to build a flexible feature testing system / experimentation engine that can bill for money (presume the billing part).

The context of what problem you’re solving is secondary because it will change and evolve.

Today I would consider starting with:

- TryCelery - no presales, no demand

- Tailwind UI wireframe or PoC in HTML. Meant to be disposable. Shuffle.dev is a handy tool.

- Flutter to recreate and build the prototype, aloha and mvp to have one code hit to hit all platforms including web. Forget is generally newer and next green collated to it’s contemporaries.

Don’t work with tailwind or flutter? Hire a product designer and dev to not build it for you but teach you both via screen shares from UPWork, etc. If they can teach you how they can probably build it vs saying they can.

Post reply on HN