Gathering detailed insights and metrics for jynxs
Gathering detailed insights and metrics for jynxs
[Experimental] Lightweight ~3KB custom JSX runtime that implements the very basics of React, with extras like async components.
npm install jynxs
Typescript
Module System
Node Version
NPM Version
67.7
Supply Chain
97.8
Quality
77.1
Maintenance
100
Vulnerability
100
License
TypeScript (82.47%)
CSS (14.18%)
HTML (3.35%)
Total Downloads
158
Last Day
2
Last Week
7
Last Month
16
Last Year
158
48 Stars
50 Commits
8 Forks
4 Watching
1 Branches
2 Contributors
Minified
Minified + Gzipped
Latest Version
0.2.1
Package Id
jynxs@0.2.1
Unpacked Size
26.87 kB
Size
9.25 kB
File Count
6
NPM Version
10.8.2
Node Version
20.17.0
Publised On
05 Sept 2024
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
250%
7
Compared to previous week
Last month
220%
16
Compared to previous month
Last year
0%
158
Compared to previous year
6
JynXS is a lightweight, ~3KB JSX runtime that implements the very basics of a modern UI library without relying on React.
This project is very experimental and a proof of concept. Not recommended for production use.
fallback
. It means you don't need to wrap your components in Suspense
.useState
for state managementuseEffect
for side effectsref
as prop, to access DOM elementsclass
and className
, and integrate with clsx
, so arrays and conditional classes are supported.useGlobalState
hook to manage and subscribe to global state in a very simple wayaction
: (data: FormData) => Promise<void>
cache()
to avoid expensive tasks on re-rendersWe won't add support for more complex features like advanced context, portals, style objects, custom hooks, etc.
Install the package with any package manager:
pnpm add jynxs
# or
npm install jynxs
# or
bun add jynxs
Configure your tsconfig.json
to use the JynXS runtime:
1{ 2 "compilerOptions": { 3 "jsx": "react-jsx", 4 "jsxImportSource": "jynxs" 5 } 6}
Configure your Vite project to transpile JSX with esbuild:
1// vite.config.ts 2import { defineConfig } from 'vite' 3 4export default defineConfig({ 5 // ... 6 esbuild: { 7 jsxFactory: 'jsx', 8 jsxFragment: 'Fragment', 9 }, 10 // ... 11})
That's it!
An example of how to use the JynXS runtime can be found in src/example.tsx
.
This file demonstrates the usage of functional components, async components, state management, effects, and event handling.
To create a production build:
pnpm build
No Babel or Webpack needed to transpile the JSX, esbuild is used instead.
No vulnerabilities found.
No security vulnerabilities found.