Favorite Social Media Timesink
When you take a break from work, where are you going?
Video clips on TikTok/YouTube
X, Bluesky, Mastodon et al...
Web surfing
I do not get distracted by petty amusements
Frontend Development / JavaScript / Open Source

Dev News: Remix Adds SPA Mode, Astro 4.1, Signals Adoption

Remix can now support single page applications, although it's marked unstable. Also, a new version of Astro and a developer AI contest.
Jan 13th, 2024 5:00am by
Featued image for: Dev News: Remix Adds SPA Mode, Astro 4.1, Signals Adoption
Image via Pixabay

Remix introduced an SPA (single page app) mode Thursday, although it’s marked unstable for now. The full stack framework announced that the SPA mode is available in Remix version 2.5 in a recent tweet.

“From the beginning, Remix’s opinion has always been that you own your server architecture,” the tweet noted. “While we believe that having a server provides the best UX/Performance/SEO/etc. for most apps, it is also undeniable that there exist plenty of valid use cases for a Single Page Application in the real world…”

For instance, it continues, SPAs are useful if a developer doesn’t want to run a Node.js server or manage a server and wants to deploy via static files on a content delivery network (CDN). SPAs are also useful if one is developing an embedded app that can’t be server-rendered or if a developer wants to migrate a React Router app to Remix. Finally, it might be useful if, to paraphrase developer Kent Dodds, your boss just doesn’t care about the ceiling of a SPA architecture and won’t let your team re-architect.

SPA Mode requires your app to be using Vite and the Remix Vite Plugin, according to the Remix SPA documentation. The SPA Mode builds heavily on top of the Client Data APIs. The release notes say that SPA Mode allows developers to generate a Remix app as a standalone SPA served from a static index.html file.

Beyond the Vite and Remix plugin requirement, there are a few actions that will throw an error:

  • Using server APIs such as headers, loader, and action;
  • Exporting a HydrateFallback from any other routers — it must be exported from the root.tsx in SPA Mode; and
  • Calling serverLoader/serverAction from the clientLoader/clientAction methods. Since there is no running server, those will throw a runtime error if called.

Astro 4.1 Available

Web framework Astro released version 4.1, which the team noted was a smaller release than usual. Along with bug fixes, the new release included:

  • New accessibility audit rules, which means warnings about unsupported ARIA attributes and missing attributes required for ARIA role.
  • New configuration option for client:visible, which now accepts a rootMargin option that will allow developers to specify a margin around the viewport to calculate visibility.
  • Custom cookie encoding and decoding through new encode and decoding functions when setting and getting cookies.

It comes on the heels of Astro 4.0, a significant release that arrived in early December. That release introduced the Astro dev toolbar, which allows customization of a developer’s local browser dev experience with Astro.

Survey Shows 26% of Angular Devs Have Adopted Signals

Angular recently surveyed its developers about their use of the framework. The survey garnered about 12,000 responses and found that 26% were already using signals, even though it was still in developer preview at the time.

Signals gives Angular a “built-in primitive for reactivity,” Progress senior developer advocate Alyssa Nicoll told The New Stack in September. Signals allows developers to easily manage and respond to changes in their applications.

The survey also found that 96% are using the latest standalone APIs.

While developers reported that they loved Angular’s integration between core modules, its runtime performance and dependency injection, they cited a need for improvements to the documentation and sample code, component authoring format and the initial load performance, wrote Minko Gechev, product and DevRel lead for Angular at Google.

The survey will inform Angular’s 2024 roadmap, Gechev added.

Quine Competition to Create an AI Dev Tool

Quine is a software development company that promises to help developers build and monetize their reputations by contributing to open source projects. It recently launched a beta function called Quests that allow developers to compete by creating a repository that builds against a particular prompt or topic, which is submitted to Quine for community feedback.

The first season of Quine creator quests will run from Nov. 7, 2023, till Jan. 19, 2024. What caught our eye, though, was this recent quest — which actually ends past the season on Jan. 23 — to create a developer tool powered by Generative AI.

“You could augment your favorite developer tools with LLMs, develop apps that help people write better code, or even an app that helps people contribute to open source,” the quest notes, adding a few potential ideas such as automating workflows, code generation, synthetic documentation, or educational tools and tutorials.

“Be bold, and be creative,” the quest urges. “The community will respond better to a simple and completed MVP that showcases a highly creative idea, rather than a very complex codebase that either doesn’t run or was not finished!”

So far, 40 repos have been submitted.

Group Created with Sketch.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.