### Install Project Dependencies Source: https://github.com/expo/react-native-action-sheet/blob/master/README.md Installs the necessary dependencies for the example project. Run this after cloning the repository. ```bash $ cd example $ yarn ``` -------------------------------- ### Build Example App Source: https://github.com/expo/react-native-action-sheet/blob/master/README.md Builds the example application for iOS, Android, or web. Ensure dependencies are installed first. ```bash $ yarn ios $ yarn android $ yarn web ``` -------------------------------- ### Install with yarn Source: https://github.com/expo/react-native-action-sheet/blob/master/README.md Use this command to install the library using yarn. ```bash yarn add @expo/react-native-action-sheet ``` -------------------------------- ### Install with npm Source: https://github.com/expo/react-native-action-sheet/blob/master/README.md Use this command to install the library using npm. ```bash npm install @expo/react-native-action-sheet ``` -------------------------------- ### Clone Repository and Install Dependencies Source: https://github.com/expo/react-native-action-sheet/blob/master/README.md Clones the action sheet repository and installs its main dependencies. This is the initial setup for development. ```bash $ git clone git@github.com:expo/react-native-action-sheet.git $ cd react-native-action-sheet $ yarn ``` -------------------------------- ### Run Web Example Source: https://github.com/expo/react-native-action-sheet/blob/master/_autodocs/platform-guide.md Navigate to the example directory and run the web application using yarn. This is used for testing web-specific features like keyboard navigation and responsive design. ```bash cd example yarn web ``` -------------------------------- ### Run iOS Example Source: https://github.com/expo/react-native-action-sheet/blob/master/_autodocs/platform-guide.md Navigate to the example directory and run the iOS application using yarn. This is used for testing native and custom ActionSheets. ```bash cd example yarn ios ``` -------------------------------- ### Install React Native Action Sheet Source: https://github.com/expo/react-native-action-sheet/blob/master/_autodocs/README.md Install the library using npm or yarn. Ensure you have React 18.0.0+ and a recent version of react-native. ```bash npm install @expo/react-native-action-sheet # or yarn add @expo/react-native-action-sheet ``` -------------------------------- ### Run Android Example Source: https://github.com/expo/react-native-action-sheet/blob/master/_autodocs/platform-guide.md Navigate to the example directory and run the Android application using yarn. This is used for testing platform-specific features like ripple effects and hardware back button. ```bash cd example yarn android ``` -------------------------------- ### Basic ActionSheetProvider Setup Source: https://github.com/expo/react-native-action-sheet/blob/master/_autodocs/api-reference/ActionSheetProvider.md Shows the most common way to integrate ActionSheetProvider by wrapping the root application component. ```typescript import { ActionSheetProvider } from '@expo/react-native-action-sheet'; import App from './App'; export default function AppContainer() { return ( ); } ``` -------------------------------- ### Basic ActionSheet Setup and Usage Source: https://github.com/expo/react-native-action-sheet/blob/master/_autodocs/usage-patterns.md Demonstrates the minimal setup required to integrate ActionSheet into your React Native app. This includes wrapping your app with ActionSheetProvider and using the useActionSheet hook to display options. ```typescript // App.tsx import { ActionSheetProvider } from '@expo/react-native-action-sheet'; import AppContent from './AppContent'; export default function App() { return ( ); } // AppContent.tsx or any child component import { useActionSheet } from '@expo/react-native-action-sheet'; import { View, Button } from 'react-native'; export default function MyComponent() { const { showActionSheetWithOptions } = useActionSheet(); const handlePress = () => { const options = ['Option 1', 'Option 2', 'Cancel']; const cancelButtonIndex = 2; showActionSheetWithOptions( { options, cancelButtonIndex }, (index) => { console.log('Selected:', index); } ); }; return (