@reticlehq/react 3.8.2 → 3.10.0

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.
@@ -217,7 +217,11 @@ export function autoRegisterStores(doc) {
217
217
  // cannot catch it either, because that adapter builds a fresh snapshot on every `getState`.
218
218
  if (sourceOwner(source) !== undefined)
219
219
  continue;
220
- if (taken.has(key) || registered.has(key))
220
+ // A name we registered ourselves for a DIFFERENT source is stale: HMR re-ran the module that
221
+ // creates the store, so the page now holds a new instance under the same name. Replace it —
222
+ // registerStore swaps the getter and subscription — instead of reading the old instance forever.
223
+ const replacesOurs = registered.has(key) && registered.get(key) !== source;
224
+ if (!replacesOurs && (taken.has(key) || registered.has(key)))
221
225
  continue;
222
226
  try {
223
227
  registerStore(key, store);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reticlehq/react",
3
- "version": "3.8.2",
3
+ "version": "3.10.0",
4
4
  "description": "Reticle React adapter — maps a DOM ref to its component stack and source file via the fiber tree.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -17,8 +17,8 @@
17
17
  "./package.json": "./package.json"
18
18
  },
19
19
  "dependencies": {
20
- "@reticlehq/browser": "3.8.2",
21
- "@reticlehq/core": "3.8.2"
20
+ "@reticlehq/browser": "3.10.0",
21
+ "@reticlehq/core": "3.10.0"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": ">=18"
@@ -26,8 +26,8 @@
26
26
  "devDependencies": {
27
27
  "@types/react": "^19.3.0",
28
28
  "jsdom": "^30.0.1",
29
- "react": "^19.3.0",
30
- "react-dom": "^19.3.0",
29
+ "react": "^19.3.1",
30
+ "react-dom": "^19.3.1",
31
31
  "@types/react-dom": "^19.3.0"
32
32
  },
33
33
  "license": "Apache-2.0",