Devalue Serialization
InteractiveRich type serialization via devalue. The Server Type column is captured during SSR and shipped as strings; the Client Type column is resolved live after hydration. They should match — proving the types survived the round-trip.
| Type | Value | Server Type | Client Type | Status |
|---|---|---|---|---|
| Date | 2025-01-15T12:00:00.000Z | Date | OK | |
| RegExp | /hello\s+world/gi | RegExp | OK | |
| Map | Map(3) { a => 1, b => 2, c => 3 } | Map | OK | |
| Set | Set(3) { 10, 20, 30 } | Set | OK | |
| BigInt | 9007199254740993n | BigInt | OK | |
| URL | https://mochi.dev/docs?version=5 | URL | OK | |
| URLSearchParams | theme=dark&lang=en | URLSearchParams | OK | |
| Uint8Array | Uint8Array [72, 101, 108, 108, 111] | Uint8Array | OK | |
| undefined | undefined | undefined | OK | |
| Infinity | Infinity | Infinity | OK | |
| NaN | NaN | NaN | OK | |
| -0 | -0 | -0 | OK | |
| Repeated ref | [{"x":1},{"x":1}] | Array | OK | |
| Cyclic ref | { self: [Circular] } | object | OK | |
| Repeated ref | same ref | identity check | OK | |
| Cyclic ref | self === obj | identity check | OK |
Server (SSR)