Migration Guide
Migrate from other libraries to SoulCache
Migration Guide
This guide helps you migrate from other data fetching libraries to SoulCache.
Upgrading v1.1.0 → v1.1.1
v1.1.1 is a security patch. The public API is unchanged and no persisted-payload migration is required. Review two behavior changes:
1. dehydrate() no longer includes error.stack
Dehydrated error entries previously carried error.stack, which can leak internal
file paths to clients in SSR flows. Stacks are now omitted by default; message
and name are always preserved.
2. sha-384 / sha-512 / md5 checksum labels can no longer be written
These labels were never implemented (every label previously produced the same
non-cryptographic 32-bit djb2 value). Writing with them now throws
SerializationError. sha-256 is now a real FIPS 180-4 SHA-256 digest (64-hex),
and legacy payloads from 1.0.0/1.1.0 remain readable under all labels.
From React Query
Setup
Hooks
Query Options
From SWR
Setup
Fetcher
Key Differences
| Feature | React Query | SWR | SoulCache |
|---|---|---|---|
| Runtime deps | 0 | 0 | 0 |
| Bundle size (min+gzip) | ~12KB | ~4KB | ~16KB |
| TypeScript | Good | Good | Excellent |
| Plugin system | Yes | No | Internal (roadmap) |
| DevTools | Yes | No | Yes |
Migration Checklist
Migration Steps
- Install
@soulcache/coreand@soulcache/react - Replace QueryClient imports
- Replace hook imports
- Update query options
- Test all queries
- Update DevTools