We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
immediate
useResize
1 parent 197e0a7 commit 7cc1c90Copy full SHA for 7cc1c90
.changeset/hot-socks-whisper.md
@@ -0,0 +1,5 @@
1
+---
2
+'@react-spring/core': patch
3
4
+
5
+Respect `immediate` option to `useResize` hook
packages/core/src/hooks/useResize.ts
@@ -57,7 +57,9 @@ export const useResize = ({
57
width,
58
height,
59
immediate:
60
- sizeValues.width.get() === 0 || sizeValues.height.get() === 0,
+ sizeValues.width.get() === 0 ||
61
+ sizeValues.height.get() === 0 ||
62
+ springOptions.immediate === true,
63
})
64
},
65
{ container: container?.current || undefined }
0 commit comments