useSyncExternalStore requires getSnapshot to return an identical reference when unchanged; @wrnexus/store's readonlySnapshot returns a fresh clone per call. The cache lives here rather than in the store package so existing consumers are untouched. createSelectorCache takes an optional equality function: the Object.is default can never stabilize a selector that allocates, which is the usual source of infinite re-renders. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
26 lines
520 B
JSON
26 lines
520 B
JSON
{
|
|
"name": "@wrnexus/react",
|
|
"version": "0.8.8",
|
|
"type": "module",
|
|
"main": "src/index.ts",
|
|
"exports": {
|
|
".": "./src/index.ts",
|
|
"./runtime": "./src/runtime-source.ts"
|
|
},
|
|
"peerDependencies": {
|
|
"react": "^19.0.0",
|
|
"react-dom": "^19.0.0"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"react": { "optional": true },
|
|
"react-dom": { "optional": true }
|
|
},
|
|
"dependencies": {
|
|
"@wrnexus/store": "workspace:*"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bun": "^1.3.14",
|
|
"typescript": "^6.0.3"
|
|
}
|
|
}
|