cogsbox-state 0.5.327 → 0.5.329

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cogsbox-state",
3
- "version": "0.5.327",
3
+ "version": "0.5.329",
4
4
  "description": "React state management library with form controls and server sync",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/CogsState.tsx CHANGED
@@ -1819,6 +1819,8 @@ function createProxyHandler<T>(
1819
1819
 
1820
1820
  // This state triggers a re-render when item heights change.
1821
1821
  const [shadowUpdateTrigger, setShadowUpdateTrigger] = useState(0);
1822
+ const hasInitiallyLoadedRef = useRef(false);
1823
+ const prevTotalCountRef = useRef(0);
1822
1824
 
1823
1825
  useEffect(() => {
1824
1826
  const unsubscribe = getGlobalStore
@@ -1939,9 +1941,6 @@ function createProxyHandler<T>(
1939
1941
  passive: true,
1940
1942
  });
1941
1943
 
1942
- const hasInitiallyLoadedRef = useRef(false);
1943
- const prevTotalCountRef = useRef(0);
1944
-
1945
1944
  // In your useLayoutEffect:
1946
1945
  if (stickToBottom) {
1947
1946
  // Check if this is initial load or new item