Registry / web-framework / babel-runtime-jsx-plus

babel-runtime-jsx-plus

JSON →
library0.1.5jsnpmunverified

Babel runtime helpers for jsx-plus, a JSX extension for condition, list, memo, slot, and classname directives. Version 0.1.5, pre-release status. Provides runtime functions like createCondition, createList, createJSXMemo, classnames, and $slot. Essential for projects using the jsx-plus Babel plugin. Differentiator: enables declarative directives in JSX with minimal runtime overhead.

npm install babel-runtime-jsx-plus
INSTALL
IMPORT
SIG · BABEL-RUNTIME-JSX-
B
babel-runtime-jsx-plus
web-frameworkjavascriptv0.1.5
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

createCondition
import { createCondition } from 'babel-runtime-jsx-plus'
const createCondition = require('babel-runtime-jsx-plus').createCondition
Package is ESM-first; named import from single entry.
createList
import { createList } from 'babel-runtime-jsx-plus'
import createList from 'babel-runtime-jsx-plus'
Functions are named exports, not default.
classnames
import { classnames } from 'babel-runtime-jsx-plus'
import classnames from 'babel-runtime-jsx-plus'
Re-exports the 'classnames' package; prefer importing directly from 'classnames' if only using that.
$slot
import { $slot } from 'babel-runtime-jsx-plus'
import { Slot } from 'babel-runtime-jsx-plus'
The slot helper is a function, not a component, and named with dollar sign.

Demonstrates importing and using all runtime helpers: createCondition, createList, createJSXMemo, classnames, and $slot.

import { createCondition, createList, createJSXMemo, classnames, $slot } from 'babel-runtime-jsx-plus'; // Condition const condition = createCondition(true, 'shown', 'hidden'); console.log(condition); // 'shown' // List const list = createList(['a', 'b', 'c'], (item, index) => ({ key: index, text: item })); console.log(list); // [{ key: 0, text: 'a' }, { key: 1, text: 'b' }, { key: 2, text: 'c' }] // Memo const memo = createJSXMemo(); const key = 'item-1'; if (!memo.has(key)) { memo.set(key, { data: 'cached' }); } console.log(memo.get(key)); // { data: 'cached' } // classnames console.log(classnames('foo', { bar: true }, ['baz'])); // 'foo bar baz' // $slot (simplified usage) const slotContent = $slot('default', { text: 'Hello' }); console.log(slotContent); // Typically used in JSX; returns children.
Debug
Known issues
gotchaPackage is pre-release (v0.1.5) and API may change without notice.
fix
Pin to exact version and test upgrades.
affects: <1.0.0
deprecatedThe classnames helper is a re-export of the 'classnames' package. Direct use of 'classnames' is preferred for clarity.
fix
Import 'classnames' from its own package instead: import classnames from 'classnames'.
affects: >=0.1.0
gotcha$slot is a function, not a React component. Using it as <$slot>...</$slot> will fail.
fix
Call $slot(...) as a function, typically within JSX expressions like { $slot('default', props) }.
affects: >=0.1.0
gotchacreateJSXMemo returns a Map-like object, but its API is not specified. Relying on Map methods may break if implementation changes.
fix
Use only documented methods: has, get, set, clear.
affects: >=0.1.0
Errors
Common errors & fixes
Cannot find module 'babel-runtime-jsx-plus'
Package not installed or not located in node_modules.
fix
Run 'npm install babel-runtime-jsx-plus' or 'yarn add babel-runtime-jsx-plus'.
export 'createCondition' was not found in 'babel-runtime-jsx-plus'
Mistyped export name or importing from wrong package version.
fix
Verify the export names: createCondition, createList, createJSXMemo, classnames, $slot.
createCondition is not a function
Import syntax error (e.g., default import instead of named import).
fix
Use named import: import { createCondition } from 'babel-runtime-jsx-plus'.
Upgrade
Version history
0.1.5latest on npm
Audit
Dependencies
classnamesrequiredThe classnames runtime helper delegates to the 'classnames' package for combining class names.
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
babel-runtime-jsx-plus — npm install babel-runtime-jsx-plus · libregistry