Text.js: Build full-stack React apps that render inside console.log
Trending on Hacker News: Text.js: Build full-stack React apps that render inside console.log (70 points / 40 comments, via textjs.org)
In one line
Text.js is the React framework for apps that render inside the DevTools console.
Opening excerpt
This page is running in your console. Open it with ⌘⌥J Ctrl+Shift+J ⌘⌥K Ctrl+Shift+K ⌘⌥C ( turn on developer features first) , click the preview below and press ↑ ↓ .
1 import { useState } from “react” ; 2 import { AsciiFont , Box , Text , useInput } from “@textjs/app” ; 3 4 export default function Page ( ) { 5 const [ count , setCount ] = useState ( 0 ) ; 6 useInput ( ( e ) => { 7 if ( e . key === “up” ) setCount ( ( c ) => c + 1 ) ; 8 if ( e . key === “down” ) setCount ( ( c ) => c - 1 ) ; 9 } ) ; 10 11 return ( 12 < Box className = “flex-col gap-1 p-2” > 13 < AsciiFont text = ”▼ TEXT.JS” /> 14 < Text color = “muted” > React 19 in console .
Folders in app/ become routes and layouts, and Back, Forward and deep links work.
Elements Console Sources Network Performance Memory Application top ▾ -url:preview://table Default levels ▾ No Issues preview://table:1 ⌨ Click to focus › ↑ ↓ move · s sort · Space select Run in console Docs Layout
Charts …
(Excerpted from the original; full article via the source link below.)
This story hit the Hacker News front page today (70 points / 40 comments, via textjs.org). Our Tech Radar aggregates daily signals on AI engineering, backend architecture and DevOps — browse the related services and further reading below, or get in touch with our team.
Source: Hacker News