Skip to content

Commit ed9410d

Browse files
authored
Fix ReanimatedDrawerLayout animation speed after rerender (#4470)
## Description Fixes #4469. `ReanimatedDrawerLayout` memoized `animateDrawer` without `animationSpeedProp`, so changing the prop did not affect later programmatic `openDrawer()` or `closeDrawer()` calls. The callback now tracks the prop and the imperative methods receive the latest default spring speed after a rerender. ## Test plan - `yarn workspace react-native-gesture-handler test --runInBand` — 159 tests passed - `yarn workspace react-native-gesture-handler ts-check` - `yarn workspace react-native-gesture-handler lint-js` — no errors (existing warnings remain) - `yarn workspace react-native-gesture-handler build`
1 parent 0d25288 commit ed9410d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎packages/react-native-gesture-handler/src/components/ReanimatedDrawerLayout.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ const DrawerLayout = function DrawerLayout(
441441
);
442442
},
443443
[
444+
animationSpeedProp,
444445
openValue,
445446
emitStateChanged,
446447
isDrawerOpen,

0 commit comments

Comments
 (0)