@ipxjs/refract 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +31 -25
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -215,24 +215,24 @@ image requests blocked.
215
215
 
216
216
  ### Bundle Size Snapshot
217
217
 
218
- The values below are from a local run on February 15, 2026.
218
+ The values below are from a local run on February 16, 2026.
219
219
 
220
220
  | Framework | JS bundle (raw) | JS bundle (gzip) |
221
221
  |---------------------------|----------------:|-----------------:|
222
- | Refract (`core`) | 8.36 kB | 3.16 kB |
223
- | Refract (`core+hooks`) | 9.76 kB | 3.65 kB |
224
- | Refract (`core+context`) | 8.85 kB | 3.38 kB |
225
- | Refract (`core+memo`) | 9.03 kB | 3.39 kB |
226
- | Refract (`core+security`) | 9.27 kB | 3.46 kB |
227
- | Refract (`refract`) | 14.64 kB | 5.34 kB |
222
+ | Refract (`core`) | 8.62 kB | 3.24 kB |
223
+ | Refract (`core+hooks`) | 10.28 kB | 3.85 kB |
224
+ | Refract (`core+context`) | 9.12 kB | 3.47 kB |
225
+ | Refract (`core+memo`) | 9.29 kB | 3.48 kB |
226
+ | Refract (`core+security`) | 9.53 kB | 3.54 kB |
227
+ | Refract (`refract`) | 15.20 kB | 5.55 kB |
228
228
  | React | 189.74 kB | 59.52 kB |
229
229
  | Preact | 14.46 kB | 5.95 kB |
230
230
 
231
231
  Load-time metrics are machine-dependent, so the benchmark script prints a fresh
232
232
  per-run timing table (median, p95, min/max, sd) for every framework.
233
233
 
234
- From this snapshot, Refract `core` gzip JS is about 18.8x smaller than React,
235
- and the full `refract` entrypoint is about 11.1x smaller.
234
+ From this snapshot, Refract `core` gzip JS is about 18.4x smaller than React,
235
+ and the full `refract` entrypoint is about 10.7x smaller.
236
236
 
237
237
  ### Component Combination Benchmarks (Vitest)
238
238
 
@@ -242,16 +242,16 @@ Higher `hz` is better.
242
242
 
243
243
  | Component usage profile | Mount (hz) | Mount vs base | Reconcile (hz) | Reconcile vs base |
244
244
  |-------------------------|------------|---------------|----------------|-------------------|
245
- | `base` | 5068.40 | baseline | 4144.37 | baseline |
246
- | `memo` | 5883.23 | +16.1% | 5154.56 | +24.4% |
247
- | `context` | 3521.54 | -30.5% | 5063.92 | +22.2% |
248
- | `fragment` | 4880.23 | -3.7% | 4079.08 | -1.6% |
249
- | `keyed` | 5763.70 | +13.7% | 4844.23 | +16.9% |
250
- | `memo+context` | 6173.01 | +21.8% | 5144.98 | +24.1% |
251
- | `memo+context+keyed` | 5606.73 | +10.6% | 4732.23 | +14.2% |
245
+ | `base` | 5341.47 | baseline | 3932.98 | baseline |
246
+ | `memo` | 5821.44 | +9.0% | 5202.62 | +32.3% |
247
+ | `context` | 3960.70 | -25.9% | 5108.06 | +29.9% |
248
+ | `fragment` | 4739.90 | -11.3% | 4114.70 | +4.6% |
249
+ | `keyed` | 6008.81 | +12.5% | 4816.85 | +22.5% |
250
+ | `memo+context` | 5670.29 | +6.2% | 5231.58 | +33.0% |
251
+ | `memo+context+keyed` | 5813.60 | +8.8% | 4606.91 | +17.1% |
252
252
 
253
- In this run, `memo+context` was the fastest mount profile, while
254
- `memo` was the fastest reconcile profile.
253
+ In this run, `keyed` was the fastest mount profile, while
254
+ `memo+context` was the fastest reconcile profile.
255
255
 
256
256
  ### Running the Benchmark
257
257
 
@@ -301,24 +301,27 @@ How Refract compares to React and Preact:
301
301
  | **Hooks** | | | |
302
302
  | useState | Yes | Yes | Yes |
303
303
  | useEffect | Yes | Yes | Yes |
304
- | useLayoutEffect | No | Yes | Yes |
304
+ | useLayoutEffect | Yes | Yes | Yes |
305
+ | useInsertionEffect | Yes | Yes | Yes |
305
306
  | useRef | Yes | Yes | Yes |
306
307
  | useMemo / useCallback | Yes | Yes | Yes |
307
308
  | useReducer | Yes | Yes | Yes |
308
309
  | useContext | Yes | Yes | Yes |
309
- | useId | No | Yes | Yes |
310
- | useTransition / useDeferredValue | No | Yes | No |
310
+ | useId | Yes | Yes | Yes |
311
+ | useSyncExternalStore | Yes | Yes | Yes |
312
+ | useImperativeHandle | Yes | Yes | Yes |
313
+ | useTransition / useDeferredValue | Partial⁵ | Yes | Partial⁷ |
311
314
  | **State & Data Flow** | | | |
312
315
  | Built-in state management | Yes | Yes | Yes |
313
316
  | Context API | Yes | Yes | Yes |
314
317
  | Refs (createRef / ref prop) | Yes | Yes | Yes |
315
- | forwardRef | No | Yes | Yes |
318
+ | forwardRef | Yes⁶ | Yes | Yes |
316
319
  | **Rendering** | | | |
317
320
  | Event handling | Yes | Yes | Yes |
318
321
  | Style objects | Yes | Yes | Yes |
319
322
  | className prop | Yes | Yes | Yes¹ |
320
323
  | dangerouslySetInnerHTML | Yes | Yes | Yes |
321
- | Portals | No | Yes | Yes |
324
+ | Portals | Yes | Yes | Yes |
322
325
  | Suspense / lazy | No | Yes | Yes² |
323
326
  | Error boundaries | Yes³ | Yes | Yes |
324
327
  | Server-side rendering | No | Yes | Yes |
@@ -333,13 +336,16 @@ How Refract compares to React and Preact:
333
336
  | memo / PureComponent | Yes | Yes | Yes |
334
337
  | **Ecosystem** | | | |
335
338
  | DevTools | Basic (hook API) | Yes | Yes |
336
- | React compatibility layer | N/A | N/A | Yes |
337
- | **Bundle Size (gzip, JS)** | ~2.9-5.0 kB⁴ | ~59.5 kB | ~6.0 kB |
339
+ | React compatibility layer | Yes⁶ | N/A | Yes|
340
+ | **Bundle Size (gzip, JS)** | ~3.2-5.6 kB⁴ | ~59.5 kB | ~6.0 kB |
338
341
 
339
342
  ¹ Preact supports both `class` and `className`.
340
343
  ² Preact has partial Suspense support via `preact/compat`.
341
344
  ³ Refract uses the `useErrorBoundary` hook rather than class-based error boundaries.
342
345
  ⁴ Refract size depends on entrypoint (`refract/core` vs `refract` full).
346
+ ⁵ Refract exposes `useTransition` / `useDeferredValue` but currently runs both synchronously (no concurrent scheduling).
347
+ ⁶ Available via opt-in compat entrypoints (`refract/compat/react*`).
348
+ ⁷ Preact compatibility is provided through `preact/compat`.
343
349
 
344
350
  ## License
345
351
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ipxjs/refract",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "A minimal React-like virtual DOM library with an optional React compat layer",
5
5
  "type": "module",
6
6
  "main": "src/refract/index.ts",