react-native-screens icon indicating copy to clipboard operation
react-native-screens copied to clipboard

feat: configuring native-stack transitions from JS

Open WoLewicki opened this issue 3 years ago • 3 comments

Description

Added an option to provide custom transitions between screens from JS. It requires setting stackAnimation: 'custom' and providing animationSpec on screen.

Changes

Added stackAnimation: 'custom' and animationSpec prop to Screen component.

Test code and steps to reproduce

Test1035.tsx

Checklist

  • [x] Included code example that can be used to test this change
  • [x] Updated TS types
  • [ ] Updated documentation:
    • [ ] https://github.com/software-mansion/react-native-screens/blob/master/guides/GUIDE_FOR_LIBRARY_AUTHORS.md
    • [ ] https://github.com/software-mansion/react-native-screens/blob/master/native-stack/README.md
    • [ ] https://github.com/software-mansion/react-native-screens/blob/master/createNativeStackNavigator/README.md
    • [ ] https://github.com/software-mansion/react-native-screens/blob/master/src/types.tsx
    • [ ] https://github.com/software-mansion/react-native-screens/blob/master/src/native-stack/types.tsx
  • [x] Ensured that CI passes

WoLewicki avatar Aug 03 '21 15:08 WoLewicki

This would be a great feature to land!

hirbod avatar Nov 24 '21 16:11 hirbod

Agree this would be awesome - curious, was this PR mostly an experiment to gauge feasibility?

sbearben avatar Sep 30 '22 02:09 sbearben

I think we will not go this way with custom transitions. After we release SET(https://github.com/software-mansion/react-native-screens/pull/1591), I think we can extend the API to be able to animate whole screens with it so we'll get the benefit of all preconfigured animations etc.

WoLewicki avatar Sep 30 '22 10:09 WoLewicki