Live data from Hacker News

Ask HN: Help me pick a front-end framework

news.ycombinator.com

131–140 of 181 posts

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

#131
I've increased my productivity massively with Remix react (https://remix.run/docs/en/v1). You default to HTML and JS but extend it with JSX/React. It supports Markdown MDX out of the box. It has some architectural features that allows me to reduce my lines of code 60-90%. No more reducers, context, weird state bugs. Just do your work and be done. But you can use all of these or any third party react component if you want to.

There are three functions, your export default JSX, a "loader" which runs on every load, and "action" for GET/POST to handle mutations. From this, you get the old style CGI script work flow.

It has its own context via OutletContext that does away with react's state weirdness/gotcha's. My old code for stripe/mailchimp/oauth was 4000 lines. In remix, it's 400 lines.

For CSS I am using Material v5, but that wasn't my choice. Although I am a big fan of it's . I think "Box" has been copied from theme-ui (?), it seems universal in this era. With just and Markdown, I can make a nice website.

For testing, I use Playwright with Cucumber-js, but with a twist. I write my tests as acceptance criteria format but in markdown. I can embed documentation and images that are ignored by the test runner.

For the backend I use Postgraphile and roles with row level security. Remix serves a cookie and I store a JWT token to talk directly to postgresql. I get enterprise level response with graphql without having to write any graphql handlers.

It's the best stack I've ever used so far. If I could describe the experience in one sentence: "Get out of my way, so I can work done!"

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

#132
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 1.0.0 has a release candidate since Friday. There have been many breaking changes leading up to that, but we’re past those now so this is an excellent time to start using it.

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

#134
post #125
post #102

Earlier quoted context omitted.

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.

do note that sveltekit just entered a release candidate phase 2 days ago https://twitter.com/geoffrich_/status/1568264897905164289?s=... meaning close to 1.0 and no further breaking changes expected

Hey, great news! Appreciate your correction.

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

#137

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…

OP literally mentions that weak typing is a deal breaker, so they should definitely use typescript.

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

#138

I switched from using React to using Elixir, Phoenix, and LiveView about a year ago and couldn't be happier. The code is easier to write (for me, anyway) and pages load a lot faster. It's also more friendly towards laptop batteries.

Liveview is just insanely fast to develop with and pick up.

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

#139
I know it may look like an odd recommendation, but if you are comfortable with Java, look at Vaadin: It allows you to write "everything" in Java, and indeed without any care for client-server separation/communication/whatever; Just like you would write a GUI in Swing or JavaFX.

For Python there are Streamlit and Dash amon others. For other languages maybe too, but I'm not aware of them.

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

#140

> Does anyone still write plain JS? Does 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.

I think you’ll find, as evidenced by many popular libraries moving to TS, that TS is incredibly popular and increasingly becoming the defacto way to write for the web
Post reply on HN