
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@backstro/astrox
Advanced tools
Astro-like components that compile to Preact — with function event handlers, signals, and full Astro tooling support
Astro-like components that compile to Preact — with function event handlers, signals, and full Astro tooling support.
Write .astrox files with the same frontmatter + template syntax as Astro, but get real Preact components with:
onclick={handler})npm install @backstro/astrox
This automatically:
*.astrox → astro file association to .vscode/settings.jsonastro.config.mjsimport { defineConfig } from 'astro/config';
import astrox from 'astrox';
export default defineConfig({
integrations: [astrox()],
});
That's it. VS Code will automatically use the Astro language mode for .astrox files, giving you full syntax highlighting, TypeScript autocomplete, and HTML completions.
To use signals you will need to install
@preact/signalsnpm install @preact/signals
Create a .astrox file:
---
import { signal } from '@preact/signals';
const count = signal(0);
function increment() {
count.value++;
}
---
<div class="counter">
<button onclick={increment}>+</button>
<span>{count}</span>
</div>
Use it in an Astro page with a client directive:
---
import Counter from '../components/Counter.astrox';
---
<Counter client:load />
.astrox files and compiles them using @astrojs/compilerOn npm install @backstro/astrox, astrox automatically:
node_modules/astro/astro-jsx.d.ts — widens event handler types from string to string | Function, so onclick={myHandler} works without TypeScript errors.vscode/settings.json — adds "*.astrox": "astro" file association for full editor support.astrox as a known file extension so imports between .astrox components resolve correctly in the editorAll patches are idempotent and safe to re-run.
MIT
FAQs
Astro-like components that compile to Preact — with function event handlers, signals, and full Astro tooling support
The npm package @backstro/astrox receives a total of 7 weekly downloads. As such, @backstro/astrox popularity was classified as not popular.
We found that @backstro/astrox demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.