@ipxjs/refract 0.10.0 → 0.10.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.
- package/README.md +32 -29
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -224,22 +224,22 @@ The values below are from a local run on February 17, 2026.
|
|
|
224
224
|
|
|
225
225
|
| Framework | JS bundle (raw) | JS bundle (gzip) |
|
|
226
226
|
|---------------------------|----------------:|-----------------:|
|
|
227
|
-
| Refract (`core`) |
|
|
228
|
-
| Refract (`core+hooks`) |
|
|
229
|
-
| Refract (`core+context`) |
|
|
230
|
-
| Refract (`core+memo`) |
|
|
231
|
-
| Refract (`core+security`) |
|
|
232
|
-
| Refract (`refract`) | 15
|
|
233
|
-
| React | 189.74 kB | 59.
|
|
234
|
-
| Preact | 14.46 kB | 5.
|
|
227
|
+
| Refract (`core`) | 10.02 kB | 3.74 kB |
|
|
228
|
+
| Refract (`core+hooks`) | 12.08 kB | 4.49 kB |
|
|
229
|
+
| Refract (`core+context`) | 10.66 kB | 4.00 kB |
|
|
230
|
+
| Refract (`core+memo`) | 10.70 kB | 3.97 kB |
|
|
231
|
+
| Refract (`core+security`) | 10.93 kB | 4.03 kB |
|
|
232
|
+
| Refract (`refract`) | 17.15 kB | 6.23 kB |
|
|
233
|
+
| React | 189.74 kB | 59.52 kB |
|
|
234
|
+
| Preact | 14.46 kB | 5.95 kB |
|
|
235
235
|
|
|
236
236
|
Load-time metrics are machine-dependent, so the benchmark script prints a fresh
|
|
237
237
|
per-run timing table (median, p95, min/max, sd) for every framework.
|
|
238
|
-
The CI preset (`make bench-ci`, 40 measured + 5 warmup runs)
|
|
239
|
-
|
|
238
|
+
The CI preset (`make bench-ci`, 40 measured + 5 warmup runs) enforces default
|
|
239
|
+
guardrails (`DCL p95 <= 16ms`, `DCL sd <= 2ms`).
|
|
240
240
|
|
|
241
|
-
From this snapshot, Refract `core` gzip JS is about
|
|
242
|
-
and the full `refract` entrypoint is about
|
|
241
|
+
From this snapshot, Refract `core` gzip JS is about 15.9x smaller than React,
|
|
242
|
+
and the full `refract` entrypoint is about 9.6x smaller.
|
|
243
243
|
|
|
244
244
|
### Component Combination Benchmarks (Vitest)
|
|
245
245
|
|
|
@@ -249,15 +249,15 @@ Higher `hz` is better.
|
|
|
249
249
|
|
|
250
250
|
| Component usage profile | Mount (hz) | Mount vs base | Reconcile (hz) | Reconcile vs base |
|
|
251
251
|
|-------------------------|------------|---------------|----------------|-------------------|
|
|
252
|
-
| `base` |
|
|
253
|
-
| `memo` |
|
|
254
|
-
| `context` |
|
|
255
|
-
| `fragment` |
|
|
256
|
-
| `keyed` |
|
|
257
|
-
| `memo+context` |
|
|
258
|
-
| `memo+context+keyed` |
|
|
259
|
-
|
|
260
|
-
In this run, `
|
|
252
|
+
| `base` | 5160.53 | baseline | 3262.99 | baseline |
|
|
253
|
+
| `memo` | 4858.51 | -5.9% | 5092.55 | +56.1% |
|
|
254
|
+
| `context` | 3862.01 | -25.2% | 4954.24 | +51.8% |
|
|
255
|
+
| `fragment` | 4656.36 | -9.8% | 3760.97 | +15.3% |
|
|
256
|
+
| `keyed` | 5754.75 | +11.5% | 4311.45 | +32.1% |
|
|
257
|
+
| `memo+context` | 5872.59 | +13.8% | 4621.45 | +41.6% |
|
|
258
|
+
| `memo+context+keyed` | 5555.42 | +7.7% | 4509.78 | +38.2% |
|
|
259
|
+
|
|
260
|
+
In this run, `memo+context` was the fastest mount profile, while
|
|
261
261
|
`memo` was the fastest reconcile profile.
|
|
262
262
|
|
|
263
263
|
### Running the Benchmark
|
|
@@ -304,7 +304,7 @@ How Refract compares to React and Preact:
|
|
|
304
304
|
| SVG support | Yes | Yes | Yes |
|
|
305
305
|
| **Components** | | | |
|
|
306
306
|
| Functional components | Yes | Yes | Yes |
|
|
307
|
-
| Class components |
|
|
307
|
+
| Class components | Partial⁶ | Yes | Yes |
|
|
308
308
|
| **Hooks** | | | |
|
|
309
309
|
| useState | Yes | Yes | Yes |
|
|
310
310
|
| useEffect | Yes | Yes | Yes |
|
|
@@ -329,10 +329,10 @@ How Refract compares to React and Preact:
|
|
|
329
329
|
| className prop | Yes | Yes | Yes¹ |
|
|
330
330
|
| dangerouslySetInnerHTML | Yes | Yes | Yes |
|
|
331
331
|
| Portals | Yes | Yes | Yes |
|
|
332
|
-
| Suspense / lazy | No
|
|
332
|
+
| Suspense / lazy | No⁸ | Yes | Yes² |
|
|
333
333
|
| Error boundaries | Yes³ | Yes | Yes |
|
|
334
334
|
| Server-side rendering | No | Yes | Yes |
|
|
335
|
-
| Hydration | No
|
|
335
|
+
| Hydration | No⁹ | Yes | Yes |
|
|
336
336
|
| **Security** | | | |
|
|
337
337
|
| Default HTML sanitizer for `dangerouslySetInnerHTML` | Yes | No | No |
|
|
338
338
|
| Configurable HTML sanitizer hook (`setHtmlSanitizer`) | Yes | No | No |
|
|
@@ -340,19 +340,22 @@ How Refract compares to React and Preact:
|
|
|
340
340
|
| Fiber architecture | Yes | Yes | No |
|
|
341
341
|
| Concurrent rendering | No | Yes | No |
|
|
342
342
|
| Automatic batching | Yes | Yes | Yes |
|
|
343
|
-
| memo / PureComponent |
|
|
343
|
+
| memo / PureComponent | Partial¹⁰ | Yes | Yes |
|
|
344
344
|
| **Ecosystem** | | | |
|
|
345
345
|
| DevTools | Basic (hook API) | Yes | Yes |
|
|
346
|
-
| React compatibility layer |
|
|
347
|
-
| **Bundle Size (gzip, JS)** | ~3.
|
|
346
|
+
| React compatibility layer | Partial⁶ | N/A | Yes⁷ |
|
|
347
|
+
| **Bundle Size (gzip, JS)** | ~3.7-6.3 kB⁴ | ~59.5 kB | ~6.0 kB |
|
|
348
348
|
|
|
349
349
|
¹ Preact supports both `class` and `className`.
|
|
350
350
|
² Preact has partial Suspense support via `preact/compat`.
|
|
351
|
-
³ Refract uses the `useErrorBoundary` hook
|
|
351
|
+
³ Refract core uses the `useErrorBoundary` hook; compat wrappers can emulate class-style boundaries.
|
|
352
352
|
⁴ Refract size depends on entrypoint (`refract/core` vs `refract` full).
|
|
353
353
|
⁵ Refract exposes `useTransition` / `useDeferredValue` but currently runs both synchronously (no concurrent scheduling).
|
|
354
|
-
⁶ Available via opt-in compat entrypoints (`refract/compat/react*`).
|
|
354
|
+
⁶ Available via opt-in compat entrypoints (`refract/compat/react*`) with partial React API parity.
|
|
355
355
|
⁷ Preact compatibility is provided through `preact/compat`.
|
|
356
|
+
⁸ Compat exports `Suspense`/`lazy`, but full suspension/fallback semantics are not implemented.
|
|
357
|
+
⁹ `hydrateRoot` is exposed in compat, but currently performs client render rather than true SSR hydration.
|
|
358
|
+
¹⁰ `memo` is supported; `PureComponent` is compat-oriented and does not guarantee full React shallow-compare behavior.
|
|
356
359
|
|
|
357
360
|
## License
|
|
358
361
|
|