Skip to content

Warning when closing Reanimated Swipeable #3044

@atheck

Description

@atheck

Description

I use the new Reanimated version of the Swipeable component. When I call close() on the ref, a warning is shown:

screenshot-1723548719660

Steps to reproduce

const swipeableRef = useRef<SwipeableMethods>(null);

const renderRightActions = () => {
  return (
    <IconButton
      onPress={() => {
        swipeableRef.current?.close();
        onPress();
      }}
    />
  );
};

return <Swipeable
  ref={swipeableRef}
  renderRightActions={renderRightActions}
/>

Snack or a link to a repository

See Steps to reproduce

Gesture Handler version

2.18.1

React Native version

0.73.9

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

Real device

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions