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…
Ask HN: Help me pick a front-end framework
121–130 of 181 posts
Re: Ask HN: Help me pick a front-end framework
#122Pro:
- Simple to learn
- Doesn't change all the time
- First-class TypeScript support
- Good default UI via Ionic
- Compiles to Web Components (although to be honest, this doesn't really matter)
- Easy testing
- Ionic as a company invests in Ionic the framework + Stencil the compiler. Might be around in 10 years, altough things could change. But this is true for all frameworks.
- You basically get an iOS/Android app for free, if you just dump the output in Capacitor (also developed by Ionic the company).
Cons:
- Stencil is not very widespread as a frontend framework.
Re: Ask HN: Help me pick a front-end framework
#123Earlier quoted context omitted.
> 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.
For prototyping and simple things, instead of mirroring my state in the DOM, I use the DOM to store state. Yes, it isn't quite as performant, but for this sort of work that doesn't usually matter.
I find it funny that people think mirroring the DOM will magically make your web app performant. I've visited plenty of React sites that are sluggish, bloated, load slowly and a pain to use. I've also visited plenty of plain ol' HTML/CSS/JS sites that are snappy, load quickly, and fast enough. No framework or clever algorithm will save you from crappy code ;)
Re: Ask HN: Help me pick a front-end framework
#124Earlier quoted context omitted.
I very strongly disagree with this. Typescript is a lifesaver on a non-trivial React codebase. Writing correct code is hard and you need every advantage you can muster. Type checking is an important part of that.
Look into nullish coalescing and optional chaining. Sure, vanilla JS or react doesn't help with using a var as a function, but I can probably count on my left hand how many times I tried to do that. That doesn't warrant a completely new language. ps.: typeof is also a thing in vanilla JS
Every time people tell me "I just don't make type errors" I look through their issue tracker and find them everywhere.
Re: Ask HN: Help me pick a front-end framework
#125Earlier quoted context omitted.
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…
This is definitely worth noting. SveleteKit is probably close to 1.0, but the current versioning strategy is incrementing one number, and those changes are always expected to be breaking (even if they aren’t frequently breaking). That said, if you start working on a given pre-release and only upgrade to 1.0, the migration shouldn’t be too painful.
meaning close to 1.0 and no further breaking changes expected
Re: Ask HN: Help me pick a front-end framework
#126"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. H…
Re: Ask HN: Help me pick a front-end framework
#127React isn’t a bad choice, but you might find Preact a better choice. It’s compatible with much of the React ecosystem too, but especially with their recently released signals library you may find its state management easier to reason about than hooks.
Re: Ask HN: Help me pick a front-end framework
#128Sounds 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…
- Install Yarn (package manager) - Run: yarn create react-app THE_NAME_OF_YOUR_APP --template typescript - start hacking
Re: Ask HN: Help me pick a front-end framework
#129I also code on my own. I was interested in building stuff, but had little time to learn everything I needed to from the bottom up to glue everything together.
Redwoodjs uses an opinionated rails-like approach to give you cli commands to generate your code to glue things together or to do the scaffolding required for the task at hand. The tech stack used is (subjectively) a good tech stack to work with: React, GraphQL, Prisma, Typescript, Jest and Storybook. To a large degree, due to the opinionated approach, at least you find yourself using what are considered to be good patterns.
If you do go the meta-framework approach, Redwoodjs has some competition in the space who are also well regarded and worth looking at.
Re: Ask HN: Help me pick a front-end framework
#130Does anyone still use ts? I mean why would you use a scripted language transpiled to another language? I suspect there is a little experience with js hence the “fear” of dynamically typed vars. Just use vue and regular js. You’ll do just fine.