{"id":41858,"library":"refui","title":"rEFui","description":"rEFui (0.17.4) is a retained-mode JavaScript framework for building UIs across web, native, and embedded environments. It uses signals for reactivity and a JSX-based component model without requiring a framework-specific compiler — any JSX-capable transpiler (Babel, esbuild, SWC, TypeScript) works out of the box. Built-in HMR support via the refurbish plugin for bundlers. The package ships with LLM-generated TypeScript declarations. Key differentiators: toolchain-agnostic design, unified API across web, NativeScript, and embedded (CheeseDOM/Resonance), and a focus on accessible tooling while delivering high-performance UIs.","status":"active","version":"0.17.4","language":"javascript","source_language":"en","source_url":"https://github.com/SudoMaker/rEFui","tags":["javascript","refui","refuel","ef","framework","frontend","native","embedded","signal","typescript"],"install":[{"cmd":"npm install refui","lang":"bash","label":"npm"},{"cmd":"yarn add refui","lang":"bash","label":"yarn"},{"cmd":"pnpm add refui","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"HMR plugin for bundlers (Bun, Vite)","package":"refurbish","optional":true}],"imports":[{"note":"ESM-only; CJS require will fail. Also type import available in TypeScript.","wrong":"const { signal } = require('refui')","symbol":"signal","correct":"import { signal } from 'refui'"},{"note":"createDOMRenderer is a subpath export from refui/dom, not from the main package.","wrong":"import { createDOMRenderer } from 'refui'","symbol":"createDOMRenderer","correct":"import { createDOMRenderer } from 'refui/dom'"},{"note":"defaults is a browser-specific export from refui/browser.","wrong":"import { defaults } from 'refui'","symbol":"defaults","correct":"import { defaults } from 'refui/browser'"},{"note":"R is a default export (the core module), not a named export. Used as JSX factory when configured.","wrong":"import { R } from 'refui'","symbol":"R","correct":"import R from 'refui'"},{"note":"The tagged template literal function t is exported directly from 'refui'.","wrong":"import { t } from 'refui/template'","symbol":"t","correct":"import { t } from 'refui'"}],"quickstart":{"code":"import { signal } from 'refui';\nimport { createDOMRenderer } from 'refui/dom';\nimport { defaults } from 'refui/browser';\n\nconst DOMRenderer = createDOMRenderer(defaults);\n\nconst App = () => {\n  const count = signal(0);\n  const increment = () => { count.value += 1; };\n\n  return (\n    <>\n      <h1>Hello, rEFui</h1>\n      <button on:click={increment}>Click me! Count is {count}</button>\n    </>\n  );\n};\n\nDOMRenderer.render(document.body, App);","lang":"typescript","description":"Shows basic state management with signals and rendering to the DOM using rEFui's DOM renderer."},"warnings":[{"fix":"Use correct subpath imports: 'refui' for core, 'refui/dom' for DOM renderer, 'refui/browser' for browser defaults.","message":"Import paths differ: signal/t from main, createDOMRenderer from refui/dom, defaults from refui/browser. Using wrong import path will cause runtime errors.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Use import syntax or configure your bundler for ESM.","message":"ESM-only package — CJS require() will fail.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Report issues on GitHub or manually augment types. Consider using // @ts-ignore as temporary workaround.","message":"TypeScript declarations are LLM-generated and may contain errors. Users may encounter type mismatches.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Set jsxFactory to 'R.c' and jsxFragment to 'R.f' in your transpiler config, or set jsxImportSource to 'refui' if using react-jsx transform.","message":"The JSX factory and fragment must be configured as 'R.c' and 'R.f' respectively, not React.createElement.","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Use on:click, on:tap, etc. as JSX attributes. See documentation for supported events.","message":"Event handlers use on:eventname syntax (e.g., on:click) instead of standard onClick.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Always use signal.value to access and mutate signals. Do not treat them as functions.","message":"Some older examples may use ()=> syntax for signal values. Ensure count.value is used to get/set signals.","severity":"deprecated","affected_versions":">=0.10.0"}],"env_vars":null,"search_vec":"'0.17.4':3 'access':91 'across':14,81 'agnost':77 'api':80 'babel':44 'base':29 'box':52 'build':12 'built':54 'built-in':53 'bundler':63 'capabl':42 'cheesedom/resonance':86 'compil':38 'compon':30 'declar':72 'deliv':94 'design':78 'differenti':74 'ef':102 'embed':18,85,106 'environ':19 'esbuild':45 'focus':89 'framework':10,36,103 'framework-specif':35 'frontend':104 'generat':70 'high':96 'high-perform':95 'hmr':56 'javascript':9,99 'jsx':28,41 'jsx-base':27 'jsx-capabl':40 'key':73 'llm':69 'llm-gener':68 'mode':8 'model':31 'nativ':16,105 'nativescript':83 'packag':65 'perform':97 'plugin':61 'reactiv':24 'refuel':101 'refui':1,2,100 'refurbish':60 'requir':33 'retain':7 'retained-mod':6 'ship':66 'signal':22,107 'specif':37 'support':57 'swc':46 'tool':92 'toolchain':76 'toolchain-agnost':75 'transpil':43 'typescript':47,71,108 'ui':13,98 'unifi':79 'use':21 'via':58 'web':15,82 'without':32 'work':48","created_at":"2026-06-04T18:54:26.683132+00:00","updated_at":"2026-06-04T18:54:26.683132+00:00","problems":[{"fix":"Ensure your bundler (Webpack 5+, Vite, etc.) respects the package.json 'exports' field. For Node.js, use at least version 12.20.","cause":"Package does not expose these subpaths or bundler does not support exports field.","error":"Cannot find module 'refui/dom' or 'refui/browser'"},{"fix":"Use import { signal } from 'refui' instead of import signal from 'refui'.","cause":"Using default import incorrectly — 'signal' is a named export, not default.","error":"Uncaught TypeError: signal is not a function"},{"fix":"Install @types/react as a workaround or suppress with // @ts-ignore. Consider contributing type fixes.","cause":"TypeScript declarations for JSX intrinsic elements may be incomplete or missing.","error":"JSX element type 'div' does not have any construct or call signatures"},{"fix":"Set 'jsx': 'react-jsx' and 'jsxImportSource': 'refui' in tsconfig.json, or set jsxFactory/R.c and jsxFragment/R.f.","cause":"TypeScript compilation requires JSX support enabled.","error":"Cannot use JSX unless the '--jsx' flag is provided"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/SudoMaker/rEFui","github":"https://github.com/SudoMaker/rEFui","docs":null,"changelog":null,"pypi":null,"npm":"refui","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}