Live data from Hacker News

Astro: Ship Less JavaScript

astro.build

81–90 of 171 posts

Re: Astro: Ship Less JavaScript

#81
post #61
post #59

Earlier quoted context omitted.

> I can't tell from the homepage or the blog post what this does The passage below, on the linked page, is a dead giveaway of what it does, no? > - 100% Static HTML, No JS: Astro renders your entire page to static HTML, removing all JavaScript from your final build by default. > - On-Demand Components: Need some JS? Astro can automatically hydrate interactive components when they become visible on the page. If the us…

Not really, I mean, it says No JS on one hand and then it says you can add JS, and you can even build your whole website using your favourite JS framework. So it is a little contradictory no? At least it does confuse me a little.

You can use your JS component library of choice, and decide whether a given component is rendered on the client or not (and certain conditions for what causes it to render). It doesn't render any of them on the client at all, by default.

Re: Astro: Ship Less JavaScript

#83
post #13

Earlier quoted context omitted.

Hey! Do you have any live demos or real(ish) apps made with Astro that we could check out?

There are a few sites in the wild already built with Astro that you can check out: - https://www.snowpack.dev/ - https://divriots.com/

The speed of snowpack is impressive. It's nearly as fast as loading plain text.

Re: Astro: Ship Less JavaScript

#84
post #44

Earlier quoted context omitted.

Next biggest thing will be a framework for a static site to generate a React app, that generates a static site, inside a web worker.

Do you mean https://wasp-lang.dev/ perhaps?

Every time I see this I get so excited until I realize again that I still have to know how to code in React, Node.js and Prisma.

Re: Astro: Ship Less JavaScript

#85
post #44
post #40

New static site generator tool releases seem to have superseded new js framework releases. I like the direction things are moving.

Next biggest thing will be a framework for a static site to generate a React app, that generates a static site, inside a web worker.

If you have a whole is running in a web worker client-side that’s hardly “static” anymore. A site is static when the page is built beforehand and served from disk — or at most built JIT on the server and then cached.

Re: Astro: Ship Less JavaScript

#86

I don't want a build process. I don't want to have to use npm, but want the option if I desire, for something like React. And when I use React, because there is unfortunately no better option, I use `"build": "npx babel --watch public/javascripts/src --out-dir public/javascripts/. --presets react-app/prod"` and that's it. I don't want create-react-app lock-in. Eject doesn't count. That's an illusion. My favorite proc…

Recently I went on a deep dive to test for myself if it’s even possible to write a modern looking web application with no build tools or dependencies, and turns out its very doable - https://github.com/ivank/vanilla-teuxdeux

Web tech has gone a long way and gives us a ton of stuff for free, without the need to reimplement it all in JS. Though the apis themselves are often rather awkward.

Sadly, the biggest missing piece in all of it though is testing.

Re: Astro: Ship Less JavaScript

#87
Alternatively, just don't write an SPA. Write a regular site, with just the few interactive elements you need.

If you use react or vue, you can plug components precisely anywhere on the page, you don't need to take over the page entirely.

In fact, with vue, you can even put the template in the HTML directly, and just hook the logic on to it, angularjs v1 style.

Re: Astro: Ship Less JavaScript

#88
post #74

Earlier quoted context omitted.

Is the Amazon forest a contract job? Would love to read more detail about that arrangement if you can make it work. Sounds big enough you could also get an ongoing retainer for maintenance and support of their set up after the initial work.

Ummm. I thought I might have to put a disclaimer in there. But I figured it was over the top enough to be clear. I was wrong. There is no app. No cactus farm. No Forest Service. No Amazon. Edit: Ok, fine! The U.S. Forest Service does exist. So does the Amazon. But the story is fiction.

I feel like you have a point to make but I'm missing it completely.

Re: Astro: Ship Less JavaScript

#89

Alternatively, just don't write an SPA. Write a regular site, with just the few interactive elements you need. If you use react or vue, you can plug components precisely anywhere on the page, you don't need to take over the page entirely. In fact, with vue, you can even put the template in the HTML directly, and just hook the logic on to it, angularjs v1 style.

> In fact, with vue, you can even put the template in the HTML directly, and just hook the logic on to it, angularjs v1 style.

That's what I do, I love the simplicity of it and how it lets you render html pages server side, with the added JS for interactivity.

Maybe not the cleanest architecture but extremely straightforward.

Re: Astro: Ship Less JavaScript

#90

Earlier quoted context omitted.

Congrats on the release. For some reason when I heard of Astro, I thought it was a dynamic server-side rendering framework, not a static site builder. But I'm sure someone else will take on SSR with islands if they haven't already. Also: > Astro is and always will be free. It is an open source project released under the MIT license. > We care deeply about building a more sustainable future for open source software. A…

Elder.js supports Islands with SSR. It is also MIT. I released it as an SEO experiment as much as anything else. I’m enjoying the dev process and am committed to facilitating (myself or paying another) it’s maintenance for several years. I can do that because my prior successes can subsidize the cost. If I had to do it again, I’d probably pick another license. As a first time maintainer of a project that is hitting t…

>>.. Demanding changes...

Your words or theirs? . I would have thought big companies looking for changes (new features?) is the perfect monetizing opportunity.

I mean, can't you just say "sure, I can add that for $2000." if it's not worth a couple grand to them, then it's not that important or worth your time.

One way to sustain the open source model is a pay-for-development approach.

Post reply on HN