yarn add react-native-drawer-layout-polyfill@2.0.0 下面的代码展示了这个库的基本使用场景: import React, { useState, useRef } from "react"; import { Button, Text, StyleSheet, View, TextInput } from "react-native"; import DrawerLayout from "react-native-drawer-layout-polyfill"; const App =...
Runnpm install react-native-drawer-layout-polyfill --save Import the component by using one of these: var DrawerLayout = require('react-native-drawer-layout-polyfill'); import DrawerLayout from 'react-native-drawer-layout-polyfill'; Follow theDrawerLayoutAndroiddocs -- the API is the same. ...
Drawer Layout caution This component is deprecated. Please usethe reanimated version. This is a cross-platform replacement for React Native'sDrawerLayoutAndroidcomponent. It provides a compatible API but allows for the component to be used on both Android and iOS. Please refer toReact Native docs...
@@ -18323,12 +18323,12 @@ react-native-dotenv@^3.3.1: dependencies: dotenv "^16.3.1" react-native-drawer-layout@^4.0.0-alpha.3: version "4.0.0-alpha.3" resolved "https://registry.yarnpkg.com/react-native-drawer-layout/-/react-native-drawer-layout-4.0.0-alpha.3.tgz#0adf51e816f2...
See thereanimated drawer layout examplefrom GestureHandler example app. importReact,{useRef}from'react'; import{StyleSheet,Text,View}from'react-native'; import{Gesture,GestureDetector}from'react-native-gesture-handler'; importReanimatedDrawerLayout,{ ...
iodine/react-native-drawer-layoutPublic NotificationsYou must be signed in to change notification settings Fork37 Star286 master BranchesTags Code Latest commit History 1 Commit .gitignore README.md react-native-drawer-layout This project is nowpart of React Native Community. ...
react-native-drawer-layout 一个platform-agnostic抽屉布局。它在每个平台上使用纯JavaScript实现来确保一致性。我们努力使其与DrawerLayoutAndroid的实现保持同步,并添加我们认为必要的功能。将其添加到项目中Run npm install react-native-drawer-layout --save 使用以下方法之一导入组件:...
import React, { useState, useRef } from "react"; import { Button, Text, StyleSheet, View, TextInput } from "react-native"; import DrawerLayout from "react-native-drawer-layout-polyfill"; const App = () => { const drawerLayoutRef = useRef(null); const [drawerPosition, setDrawerPosition] ...
react-native-drawer-layout A platform-agnostic drawer layout. Pure JavaScript implementation on iOS and native implementation on Android. Why? Because the drawer layout is a useful component regardless of the platform! And if you can use it without changing any code, that's perfect. ...