Skip to content

Commit

Permalink
DrawerLayoutAndroid: Convert to ES6 class (#21980)
Browse files Browse the repository at this point in the history
Summary:
This pull requests converts `DrawerLayoutAndroid` from a `createReactClass`-based component to an ES6 class component, removing its use of `NativeMethodsMixin` and `prop-types` in the process.

Unfortunately this couldn't be moved over to a full `forwardRef` to the native component, because it has the methods `openDrawer` and `closeDrawer` as part of its API, and they can't be called directly on the native component. A `createRef`-based ref to the native component can be accessed from the `nativeRef` property of a `DrawerLayoutAndroid` instance if a native ref is needed.

The Flow types for callbacks have also been filled out.
Pull Request resolved: #21980

Reviewed By: TheSavior

Differential Revision: D12901951

Pulled By: RSNara

fbshipit-source-id: d35fa5f11b1059f49b466b52abeec902db1d22f7
  • Loading branch information
empyrical authored and facebook-github-bot committed Nov 17, 2018
1 parent 7b2030b commit bea3bb6
Showing 1 changed file with 190 additions and 131 deletions.
Loading

0 comments on commit bea3bb6

Please sign in to comment.