@rific/scroll-view 0.8.0 → 0.8.2
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/dist/index.js +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +6 -6
- package/src/ScrollViewFooter.tsx +6 -1
package/dist/index.js
CHANGED
|
@@ -1070,7 +1070,9 @@ var ScrollViewFooter = ({ children, style }) => {
|
|
|
1070
1070
|
const insets = (0, import_react_native_safe_area_context3.useSafeAreaInsets)();
|
|
1071
1071
|
const keyboardHeight = useKeyboardInset();
|
|
1072
1072
|
const setFooterHeightRef = (0, import_react12.useRef)(setFooterHeight);
|
|
1073
|
-
|
|
1073
|
+
(0, import_react12.useEffect)(() => {
|
|
1074
|
+
setFooterHeightRef.current = setFooterHeight;
|
|
1075
|
+
});
|
|
1074
1076
|
(0, import_react12.useEffect)(
|
|
1075
1077
|
() => () => {
|
|
1076
1078
|
setFooterHeightRef.current(null);
|
package/dist/index.mjs
CHANGED
|
@@ -1012,7 +1012,9 @@ var ScrollViewFooter = ({ children, style }) => {
|
|
|
1012
1012
|
const insets = useSafeAreaInsets3();
|
|
1013
1013
|
const keyboardHeight = useKeyboardInset();
|
|
1014
1014
|
const setFooterHeightRef = useRef7(setFooterHeight);
|
|
1015
|
-
|
|
1015
|
+
useEffect4(() => {
|
|
1016
|
+
setFooterHeightRef.current = setFooterHeight;
|
|
1017
|
+
});
|
|
1016
1018
|
useEffect4(
|
|
1017
1019
|
() => () => {
|
|
1018
1020
|
setFooterHeightRef.current(null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rific/scroll-view",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Blur styled scroll system for React Native. Floating headers/footers, keyboard awareness, and scroll-away chrome",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
"prettier": "@infinitetoken/eslint-config/prettier",
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@infinitetoken/eslint-config": "0.2.0",
|
|
65
|
-
"@infinitetoken/jest-config": "^0.
|
|
66
|
-
"@infinitetoken/tsconfig": "^0.
|
|
65
|
+
"@infinitetoken/jest-config": "^0.4.0",
|
|
66
|
+
"@infinitetoken/tsconfig": "^0.5.0",
|
|
67
67
|
"@reduxjs/toolkit": "^2.12.0",
|
|
68
|
-
"@rific/auto-paper": "^0.
|
|
69
|
-
"@rific/core": "^0.
|
|
68
|
+
"@rific/auto-paper": "^0.12.0",
|
|
69
|
+
"@rific/core": "^0.2.0",
|
|
70
70
|
"@testing-library/dom": "^10.4.1",
|
|
71
71
|
"@testing-library/react": "^16.3.2",
|
|
72
72
|
"@types/jest": "^30.0.0",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"@rific/auto-paper": ">=0.10.0",
|
|
95
|
-
"@rific/core": "^0.
|
|
95
|
+
"@rific/core": "^0.2.0",
|
|
96
96
|
"react": ">=19.0.0",
|
|
97
97
|
"react-native": ">=0.83.0",
|
|
98
98
|
"react-native-gesture-handler": ">=2.0.0 <3.0.0",
|
package/src/ScrollViewFooter.tsx
CHANGED
|
@@ -24,8 +24,13 @@ export const ScrollViewFooter = ({ children, style }: ScrollViewFooterProps) =>
|
|
|
24
24
|
// recover it (the DOM node's true size never changed, so onLayout never fires again). Reading
|
|
25
25
|
// through a ref sidesteps that: the effect itself only ever runs once, on mount/unmount, so its
|
|
26
26
|
// cleanup fires exactly when it's meant to (a real unmount) rather than after every measurement.
|
|
27
|
+
// The mirror below has to be effect-based too, not a bare render-time assignment: writing to the
|
|
28
|
+
// ref during render is a React-render-purity violation (render can be discarded/replayed), so it's
|
|
29
|
+
// done in its own no-deps effect, which still re-runs on every commit and keeps the ref current.
|
|
27
30
|
const setFooterHeightRef = useRef(setFooterHeight)
|
|
28
|
-
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
setFooterHeightRef.current = setFooterHeight
|
|
33
|
+
})
|
|
29
34
|
useEffect(
|
|
30
35
|
() => () => {
|
|
31
36
|
setFooterHeightRef.current(null)
|