@livequery/react 1.0.100 → 1.0.101

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.
@@ -15,6 +15,7 @@ export const useCollectionData = (ref, collection_options = {}) => {
15
15
  loading: collection_options.lazy ? false : true,
16
16
  error: undefined
17
17
  });
18
+ const [n, sn] = useState(0);
18
19
  const collection_ref = useRef();
19
20
  useEffect(() => {
20
21
  if (!ref || typeof window == 'undefined')
@@ -23,6 +24,7 @@ export const useCollectionData = (ref, collection_options = {}) => {
23
24
  const subscription = collection.subscribe(data => {
24
25
  collection_options.load_all && data.loading == false && data.has_more && collection?.fetch_more();
25
26
  ss(data);
27
+ sn(Math.random());
26
28
  });
27
29
  !collection_options?.lazy && collection?.fetch_more();
28
30
  return () => subscription.unsubscribe();
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "url": "https://github.com/livequery/react"
5
5
  },
6
6
  "type": "module",
7
- "version": "1.0.100",
7
+ "version": "1.0.101",
8
8
  "description": "",
9
9
  "main": "build/index.js",
10
10
  "types": "build/index.d.ts",