Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

state property is missing in DrawerLayoutMethods #3405

Closed
atheck opened this issue Feb 13, 2025 · 3 comments
Closed

state property is missing in DrawerLayoutMethods #3405

atheck opened this issue Feb 13, 2025 · 3 comments
Labels
Missing repro Platform: Android This issue is specific to Android

Comments

@atheck
Copy link

atheck commented Feb 13, 2025

Description

When migrating from the DrawerLayout to ReanimatedDrawerLayout and using its ref, I'm missing the state.drawerOpened property.

Steps to reproduce

  1. Use ReanimatedDrawerLayout and its ref property
  2. Try to get the opened state of the drawer by using the ref

Snack or a link to a repository

No bug to reproduce

Gesture Handler version

2.23.1

React Native version

0.76.0

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added the Platform: Android This issue is specific to Android label Feb 13, 2025
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@latekvo
Copy link
Contributor

latekvo commented Feb 14, 2025

Hey, the ReanimatedDrawerLayout has been rewritten as a functional component, and functional components don't expose their inner state. You should be able to use either onDrawerOpen or onDrawerWillOpen as a replacement for state.drawerOpened. Let me know if that works for you, or if there are any issues with that approach.

@latekvo latekvo closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2025
@atheck
Copy link
Author

atheck commented Feb 17, 2025

@latekvo Yes, this works for me. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro Platform: Android This issue is specific to Android
Projects
None yet
Development

No branches or pull requests

2 participants