Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@farm.js/preact

Latest version: v0.1.0-beta.41

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: kinfish
746 Stars
23 Forks
12 Versions
1.3K Downloads
TypeScript Repo language

Scan summary

@farm.js/preact was last scanned on 24 Nov 2026 at version 0.1.0-beta.41. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 12 versions; the latest 2 were published within 2 days (23 and 24 Nov 2026).
  • Findings: No rules fired in version 0.1.0-beta.41.
  • Downloads: 1,327 downloads.

Versions

12 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.0-beta.41 LATEST 24 Nov 2026 No rules fired
0.1.0-beta.40 23 Nov 2026 No rules fired
0.1.0-beta.39 16 Nov 2026 No rules fired
0.1.0-beta.38 15 Nov 2026 Not shown
0.1.0-beta.37 6 Nov 2026 Not shown

No rules fired in 0.1.0-beta.41

Findings

Findings for v0.1.0-beta.41. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.0-beta.41; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@farm.js/preact

Preact renderer for Farm.js applications. It compiles route components as Preact JSX, renders them on the server with Node or Web streaming, hydrates them in the browser, and enables Prefresh for hot updates. Farm keeps routing, layouts, API routes, middleware, and deployment output.

This package is in beta. See Stability and Support.

Install

pnpm add @farm.js/core @farm.js/preact preact

@farm.js/core (>=0.1.0 <0.3.0) and preact (^10.29.8) are peer dependencies. The Vite preset (@preact/preset-vite) and preact-render-to-string are installed with the adapter.

To start a new project with Preact already selected:

pnpm create @farm.js/app my-preact-app --template basic --renderer preact

The Better Auth starter also ships native Preact routes and forms with --template better-auth.

Configure

import { defineConfig } from "@farm.js/core";
import { preact } from "@farm.js/preact";

export default defineConfig({
  renderer: preact(),
});

preact() takes no options. The renderer is application-wide, so do not mix Preact route components with another renderer's components in the same route tree.

Pages and layouts

Routes are .tsx or .jsx files under src/app. Layout children use Preact's ComponentChildren type:

// src/app/layout.tsx
import type { Metadata } from "@farm.js/core";
import type { ComponentChildren } from "preact";
import "./globals.css";

export const metadata: Metadata = {
  title: "Farm.js with Preact",
};

export default function RootLayout({ children }: { children?: ComponentChildren }) {
  return <>{children}</>;
}

Mark interactive components with "use client" and use Preact hooks normally:

"use client";

import { useState } from "preact/hooks";

export function Counter() {
  const [count, setCount] = useState(0);
  return <button onClick={() => setCount((value) => value + 1)}>Count: {count}</button>;
}

For TypeScript, the starter sets "jsx": "react-jsx" and "jsxImportSource": "preact" in tsconfig.json. Async function components are rejected with an actionable error instead of rendering an empty string, so resolve data before rendering the component.

Client bindings

@farm.js/preact/bindings re-exports Farm's client hooks. They are React-shaped and run on Preact through the preact/compat aliases, so no second UI runtime ships to the browser.

Export Purpose
useRouter, useNavigation, usePageState, useBlocker, useScrollRestoration Router state and navigation
useAction Call a server function
useServerQuery Read a cached server query
useTheme Read and change the theme
useLocale, useTranslations i18n state and translations
"use client";

import { useRouter, useTheme } from "@farm.js/preact/bindings";

export function Toolbar() {
  const router = useRouter();
  const { resolvedTheme, toggleTheme } = useTheme();

  return (
    <nav>
      <button onClick={() => router.push("/products")}>Products</button>
      <button onClick={() => toggleTheme()}>Theme: {resolvedTheme}</button>
    </nav>
  );
}

API routes, server functions, the generated API client, cache, and storage are renderer-neutral and work from Preact components unchanged.

React compatibility

@preact/preset-vite aliases react and react-dom imports to preact/compat, which lets many existing client components and hooks run without changes. Third-party React integration UI depends on each provider, so verify it before relying on it in production.

React Server Components remain React-only. Programmatic UI routes, Markdown and MDX visual pages, the docs adapter, generated JSX metadata images, and integration UI providers are compatibility surfaces under Preact.

Entry points

Subpath Purpose
@farm.js/preact The preact() factory and the PREACT_RENDERER descriptor.
@farm.js/preact/bindings Client hooks for router, actions, queries, theme, and i18n.
@farm.js/preact/vite Vite plugin for Preact JSX and Prefresh.
@farm.js/preact/server Server rendering to a string, a Node stream, or a Web stream.
@farm.js/preact/client Browser hydration through Preact's hydrate().

Farm loads the vite, server, and client entries from the renderer descriptor. Applications normally import only the package root and /bindings.

Documentation

Report issues and find examples in the Farm.js repository.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @farm.js/preact

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Frame 2085668439 (1)
Group 1261154229